[PATCH] D150468: [RISCVGatherScatterLowering] Remove restriction that shift must have constant operand

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 11:41:13 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp:250
-    // Only support shift by constant.
-    if (!isa<Constant>(BO->getOperand(1)))
-      return false;
----------------
This might have been a hacky way of ensuring that the shift amount was the loop invariant splat part? the code right after the switch assumes the instructions are commutable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150468



More information about the llvm-commits mailing list