[llvm-bugs] [Bug 41594] New: [x86] miscompile extract of bool vec

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Apr 24 17:05:38 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41594

            Bug ID: 41594
           Summary: [x86] miscompile extract of bool vec
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

define i16 @bitcast_extract(<32 x i8> %x, <32 x i8> %y) {
  %t1 = icmp slt <32 x i8> %x, %y
  %t2 = bitcast <32 x i1> %t1 to <2 x i16>
  %t3 = extractelement <2 x i16> %t2, i32 1
  ret i16 %t3
}

For a pre-AVX target, this gets reduced wrongly to an undef, so:

$ ./llc -o - ext.ll 
        retq


The problem appears during legalization, but I have not stepped through all of
the debug spew to see exactly what happened.

-- 
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/20190425/e293067d/attachment.html>


More information about the llvm-bugs mailing list