[PATCH] D104903: [X86] Limit the scaled element type to i64/f64

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 27 02:55:24 PDT 2021


pengfei marked an inline comment as done.
pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:43639
+  int Size = VT.getVectorNumElements();
   if (VT.is256BitVector() && Subtarget.hasInt256()) {
     SmallVector<int> Mask0, Mask1;
----------------
lebedev.ri wrote:
> Since the final shuffle has element type of i64/f64,
> should this enforce that the source element type is less than that?
The source type can only be i16, i32, f32 and f64.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:43664-43666
+          for (int I = 0; I < 4; ++I)
+            if (ShuffleMask[I] != ScaledMask1[I])
+              return SDValue();
----------------
lebedev.ri wrote:
> So what this checking is that `ScaledMask0 == ScaledMask1` (i.e. scaled Mask0 and Mask1 are identical)?
> Again, special-casing `8` seems weird.
Yes. Thanks for reminding.


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