[llvm-bugs] [Bug 45995] New: X86 bugs in extract value and select

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 19 12:48:11 PDT 2020


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

            Bug ID: 45995
           Summary: X86 bugs in extract value and select
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ajcbik at google.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

The method combineExtractVectorElt() in lib/Target/X86/X86ISelLowering.cpp
incorrectly combines the extract_vector_elt instructions that operate on
different results. For example, it is fine to combine


 t0 = merge_values a0, a1, a2, a3
 i1 = extract_vector_elt t0, Constant:i64<2>
 i1 = extract_vector_elt t0, Constant:i64<3>

but not

 i1 = extract_vector_elt t0:1, Constant:i64<2>

(note the :1), since it operates on a different result. As a result, a single
MOVMSK is shared, when there should be several.

While debugging the issue, I also found a but in combineSelect() in the same
file. The part that tries to deal with bitcasts did not properly test for an
actual machine value type.

-- 
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/20200519/24082151/attachment.html>


More information about the llvm-bugs mailing list