[LLVMbugs] [Bug 18319] New: Function ConstantFoldSelectInstruction doesn't handle vector select constant expression with "undefs"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Dec 24 06:58:47 PST 2013
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: unassignedbugs at nondot.org
Reporter: ili.filippov at gmail.com
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131224/003faeea/attachment.html>
More information about the llvm-bugs
mailing list