[LLVMbugs] [Bug 19717] New: Assertion failure when reordering shuffle and binary operation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 11 20:09:59 PDT 2014
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: unassignedbugs at nondot.org
Reporter: Hao.Liu at arm.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140512/46d040bf/attachment.html>
More information about the llvm-bugs
mailing list