summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-05-13 05:13:13 +0000
committerNadav Rotem <nrotem@apple.com>2013-05-13 05:13:13 +0000
commit985eb9004c280f4921e4bb450d6b3ee2ce75f634 (patch)
tree286b0a893788051b26c2914246c25fc7f09b5455
parent3778c04b2e3bc879cb7f175ba4d42f23fb9cef76 (diff)
downloadllvm-985eb9004c280f4921e4bb450d6b3ee2ce75f634.tar.gz
llvm-985eb9004c280f4921e4bb450d6b3ee2ce75f634.tar.bz2
llvm-985eb9004c280f4921e4bb450d6b3ee2ce75f634.tar.xz
SLPVectorizer: Swap LHS and RHS. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181684 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Vectorize/VecUtils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Vectorize/VecUtils.cpp b/lib/Transforms/Vectorize/VecUtils.cpp
index 1362b784f0..80d61616aa 100644
--- a/lib/Transforms/Vectorize/VecUtils.cpp
+++ b/lib/Transforms/Vectorize/VecUtils.cpp
@@ -730,15 +730,15 @@ Value *BoUpSLP::vectorizeTree_rec(ArrayRef<Value *> VL, int VF) {
case Instruction::Xor: {
ValueList LHSVL, RHSVL;
for (int i = 0; i < VF; ++i) {
- RHSVL.push_back(cast<Instruction>(VL[i])->getOperand(0));
- LHSVL.push_back(cast<Instruction>(VL[i])->getOperand(1));
+ LHSVL.push_back(cast<Instruction>(VL[i])->getOperand(0));
+ RHSVL.push_back(cast<Instruction>(VL[i])->getOperand(1));
}
- Value *RHS = vectorizeTree_rec(RHSVL, VF);
Value *LHS = vectorizeTree_rec(LHSVL, VF);
+ Value *RHS = vectorizeTree_rec(RHSVL, VF);
IRBuilder<> Builder(GetLastInstr(VL, VF));
BinaryOperator *BinOp = cast<BinaryOperator>(VL0);
- Value *V = Builder.CreateBinOp(BinOp->getOpcode(), RHS,LHS);
+ Value *V = Builder.CreateBinOp(BinOp->getOpcode(), LHS,RHS);
for (int i = 0; i < VF; ++i)
VectorizedValues[VL[i]] = V;