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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to