http://llvm.org/bugs/show_bug.cgi?id=19717
Bug ID: 19717
Summary: Assertion failure when reordering shuffle and binary
operation
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
This bug is introduced by the commit
http://llvm.org/viewvc/llvm-project?rev=208488&view=rev
This patch tries to do the following transformation:
Op(shuffle(v1, m), shuffle(v2, m)) -> shuffle(Op(v1, v2), m)
But when v1 and v2 are different types, to create Op(v1, v2) may trigger
assertions.
To reproduce with following test case simple.ll:
-------------------------------------------------------------------------------
define <2 x i32> @dotest(<4 x i32> %in0, <2 x i32> %in1) {
entry:
%shuffle = shufflevector <4 x i32> %in0, <4 x i32> %in0, <2 x i32>
zeroinitializer
%shuffle4 = shufflevector <2 x i32> %in1, <2 x i32> %in1, <2 x i32>
zeroinitializer
%mul = mul <2 x i32> %shuffle, %shuffle4
ret <2 x i32> %mul
}
-------------------------------------------------------------------------------
Run with:
$opt -S -instcombine simple.ll
The error message is like:
opt: llvm/lib/IR/Instructions.cpp:1848: static llvm::BinaryOperator*
llvm::BinaryOperator::Create(llvm::Instruction::BinaryOps, llvm::Value*,
llvm::Value*, const llvm::Twine&, llvm::Instruction*): Assertion `S1->getType()
== S2->getType() && "Cannot create binary operator with two operands of
differing type!"' failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs