http://llvm.org/bugs/show_bug.cgi?id=18319
Bug ID: 18319
Summary: Function ConstantFoldSelectInstruction doesn't handle
vector select constant expression with "undefs"
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
The problem is reproducible with LLVM trunk.
The reproducer:
; Function Attrs: nounwind
define void @function(<8 x i8>* %RET) #6 {
allocas:
%m8.i161 = trunc <8 x i16> select (<8 x i1> <i1 true, i1 true, i1 true, i1
true, i1 true, i1 undef, i1 undef, i1 undef>, <8 x i16> <i16 -1, i16 -1, i16
-1, i16 -1, i16 -1, i16 0, i16 0, i16 0>, <8 x i16> zeroinitializer) to <8 x
i8>
store <8 x i8> %m8.i161, <8 x i8>* %RET
ret void
}
opt reproducer.ll -instcombine > reproducer.bc
The command fails in assert. This happens because vector select constant
expression containing "undefs" is not transformed to regular vector constant.
And then cast optimization doesn’t know how to work with it.
Particularly, in function ConstantFoldSelectInstruction const vector select is
converted to vector select only if it contains true or false value (which seems
reasonable from the first glance), but it also needs to handle "undef" somehow.
--
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