summaryrefslogtreecommitdiff
path: root/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorSerge Pavlov <sepavloff@gmail.com>2014-05-12 10:11:27 +0000
committerSerge Pavlov <sepavloff@gmail.com>2014-05-12 10:11:27 +0000
commitb1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd (patch)
tree169db97dae1a249d816b9db049ee16fc122fdc57 /lib/Transforms/InstCombine
parentf1e04540f67e686ef1b1cf858e64797500a4012d (diff)
downloadllvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.gz
llvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.bz2
llvm-b1a6b91a1e833fcccae5d2c367f5dd29d4ea6fdd.tar.xz
Fix type of shuffle obtained from reordering with binary operation
In transformation: BinOp(shuffle(v1,undef), shuffle(v2,undef)) -> shuffle(BinOp(v1, v2),undef) type of the undef argument must be same as type of BinOp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r--lib/Transforms/InstCombine/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp
index 90ca8863e8..8c0a249aee 100644
--- a/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1125,7 +1125,7 @@ Value *InstCombiner::SimplifyVectorOp(BinaryOperator &Inst) {
BinaryOperator *NewBO = CreateBinOpAsGiven(Inst, LShuf->getOperand(0),
RShuf->getOperand(0), Builder);
Value *Res = Builder->CreateShuffleVector(NewBO,
- UndefValue::get(Inst.getType()), LShuf->getMask());
+ UndefValue::get(NewBO->getType()), LShuf->getMask());
return Res;
}
}