[PATCH] D104903: [X86] Twist shuffle mask when fold HOP(SHUFFLE(X,Y),SHUFFLE(X,Y)) -> SHUFFLE(HOP(X,Y))

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 17:54:30 PDT 2021


pengfei added inline comments.


================
Comment at: llvm/test/CodeGen/X86/packss.ll:373
 ; AVX2-NEXT:    vpacksswb %ymm0, %ymm1, %ymm0
-; AVX2-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,2,3]
+; AVX2-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,1,0,3]
 ; AVX2-NEXT:    ret{{[l|q]}}
----------------
RKSimon wrote:
> pengfei wrote:
> > This is a bug. Verified here https://godbolt.org/z/x5Kns4Mha
> Did you manage to track this one down?
Oops, the words are misleading. I meant the previous generated code was buggy and this patch fixes it. I should have commented on the left side. :)


================
Comment at: llvm/test/CodeGen/X86/pr50823.ll:6
+
+declare <8 x float> @llvm.x86.avx.maskload.ps.256(i8*, <8 x i32>)
+declare <8 x float> @llvm.x86.avx.hadd.ps.256(<8 x float>, <8 x float>)
----------------
RKSimon wrote:
> unused declaration?
Good catch!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104903



More information about the llvm-commits mailing list