[PATCH] D108539: [X86][AVX] Attempt to fold a scaled index into a gather/scatter scale immediate (PR13310)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 28 11:23:18 PDT 2021


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:50239
+  // TODO: Move this into X86DAGToDAGISel::matchVectorAddressRecursively?
+  if ((Index.getOpcode() == X86ISD::VSHLI ||
+       (Index.getOpcode() == ISD::ADD &&
----------------
craig.topper wrote:
> Does the Index element size need to be pointer width for this to be legal? The implicit sign extend is applied before the scale.
Nice catch! I'll add a check/test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108539



More information about the llvm-commits mailing list