[llvm-bugs] [Bug 22391] New vector shuffle legality: turns pshufd+palignr into shufps x2.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Feb 17 07:08:41 PST 2018


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

Simon Pilgrim <llvm-dev at redking.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
 Fixed By Commit(s)|                            |325354
         Resolution|---                         |FIXED

--- Comment #2 from Simon Pilgrim <llvm-dev at redking.me.uk> ---
This was finally fixed at the DAG level by rL325354 (SimplifyDemandedVectorElts
shuffle mask simplification). 

Note, it'd have been effectively fixed for sometime as InstCombine would
already simplify the test case from:

  %s1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1,
i32 2, i32 2>
  %s2 = shufflevector <4 x i32> %s1, <4 x i32> %b, <4 x i32> <i32 3, i32 4, i32
5, i32 6>
  ret <4 x i32> %s2

to

  %s1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 undef, i32
undef, i32 undef, i32 2>
  %s2 = shufflevector <4 x i32> %s1, <4 x i32> %b, <4 x i32> <i32 3, i32 4, i32
5, i32 6>
  ret <4 x i32> %s2

which would correctly lower to vpshufd/vpalignr.

-- 
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/20180217/320ee9dd/attachment-0001.html>


More information about the llvm-bugs mailing list