From 02ff620c7b48ab9af12512aead2ec069978f73b0 Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Mon, 12 May 2014 10:11:27 +0000 Subject: 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. llvm-svn: 208531 --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/InstCombine') diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp index 90ca8863e8c..8c0a249aee1 100644 --- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/llvm/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; } } -- cgit v1.2.3