[LLVMbugs] [Bug 20396] New: [AArch64] Build improper vector filled with undef when constant folding vselect.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jul 22 02:25:39 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20396

            Bug ID: 20396
           Summary: [AArch64] Build improper vector filled with undef when
                    constant folding vselect.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: kevinqindev at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Testcase:
$cat test.ll

define <8 x i16> @test() {
entry:
  %mul.i = select <8 x i1> <i1 true, i1 false, i1 false, i1 true, i1 true, i1
false, i1 false, i1 true>, <8 x i16> <i16 0, i16 undef, i16 undef, i16 0, i16
0, i16 undef, i16 undef, i16 0>, <8 x i16> zeroinitializer
  %add.i = add <8 x i16> %mul.i, <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16
1, i16 1>
  ret <8 x i16> %add.i
}

Output:
$llc -mtriple=aarch64 <test.ll

LLVM ERROR: Cannot select: 0x4d423f8: v8i16 = BUILD_VECTOR 0x4d44de8,
0x4d44ce0, 0x4d44ce0, 0x4d44de8, 0x4d44de8, 0x4d44ce0, 0x4d44ce0, 0x4d44de8
[ORD=2] [ID=10]
  0x4d44de8: i32 = Constant<0> [ID=4]
  0x4d44ce0: i32 = undef [ID=3]
  0x4d44ce0: i32 = undef [ID=3]
  0x4d44de8: i32 = Constant<0> [ID=4]
  0x4d44de8: i32 = Constant<0> [ID=4]
  0x4d44ce0: i32 = undef [ID=3]
  0x4d44ce0: i32 = undef [ID=3]
  0x4d44de8: i32 = Constant<0> [ID=4]

It seems that it's caused by the bug in DAGcombiner when doing constant fold on
expanded vselect.

-- 
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/20140722/fc277400/attachment.html>


More information about the llvm-bugs mailing list