// The vectorizer is trying to either have all elements one side being
// instruction with the same opcode to enable further vectorization, or having
// a splat to lower the vectorizing cost.
-static bool shouldReorderOperands(
- int i, unsigned Opcode, Instruction &I, ArrayRef<Value *> Left,
- ArrayRef<Value *> Right, bool AllSameOpcodeLeft, bool AllSameOpcodeRight,
- bool SplatLeft, bool SplatRight, Value *&VLeft, Value *&VRight) {
+static bool shouldReorderOperands(int i, Instruction &I, ArrayRef<Value *> Left,
+ ArrayRef<Value *> Right,
+ bool AllSameOpcodeLeft,
+ bool AllSameOpcodeRight, bool SplatLeft,
+ bool SplatRight, Value *&VLeft,
+ Value *&VRight) {
VLeft = I.getOperand(0);
VRight = I.getOperand(1);
// If we have "SplatRight", try to see if commuting is needed to preserve it.
// one side.
Value *VLeft;
Value *VRight;
- if (shouldReorderOperands(i, Opcode, *I, Left, Right, AllSameOpcodeLeft,
+ if (shouldReorderOperands(i, *I, Left, Right, AllSameOpcodeLeft,
AllSameOpcodeRight, SplatLeft, SplatRight, VLeft,
VRight)) {
Left.push_back(VRight);