[llvm-bugs] [Bug 25247] New: SLPVectorizer is sensitive to the order of operands (commutative ops)

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 18 21:36:08 PDT 2015


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

            Bug ID: 25247
           Summary: SLPVectorizer is sensitive to the order of operands
                    (commutative ops)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mehdi.amini at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15107
  --> https://llvm.org/bugs/attachment.cgi?id=15107&action=edit
This IR will be vectorized

The two IR files attached shows the issue. The diff between the two files is
only the order of the operands to two xor operations.

363c363
<   %284 = xor i8 %31, %283
---
>   %284 = xor i8 %283, %31
401c401
<   %306 = xor i8 %146, %283
---
>   %306 = xor i8 %283, %146


In one case, reorderInputsAccordingToOpcode() will produce a splat on one-side,
which lead to a lower cost and triggers the vectorization.

-- 
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/20151019/a1e14e7c/attachment.html>


More information about the llvm-bugs mailing list