[PATCH] D65132: [X86] In lowerVectorShuffle, instead of creating a new node to canonicalize the shuffle mask by commuting, just commute the mask and swap V1/V2.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 06:38:47 PDT 2019


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM - cheers



================
Comment at: llvm/test/CodeGen/X86/vector-shuffle-128-v2.ll:721
 ; SSE2:       # %bb.0:
-; SSE2-NEXT:    xorpd %xmm1, %xmm1
-; SSE2-NEXT:    movsd {{.*#+}} xmm0 = xmm1[0],xmm0[1]
+; SSE2-NEXT:    xorps %xmm1, %xmm1
+; SSE2-NEXT:    unpckhpd {{.*#+}} xmm1 = xmm1[1],xmm0[1]
----------------
craig.topper wrote:
> Not sure if this should be considered a regression or not. The types are integers here so we're really matching an integer unpckh during shuffle lowering. We don't have an equivalent of movsd in the integer domain. Only later does the execution domain fixing pass move it to FP.
Annoying but not terrible - shuffle combining should probably catch this in matchBinaryShuffle for cases where one of the mask elements is zero.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65132/new/

https://reviews.llvm.org/D65132





More information about the llvm-commits mailing list