[PATCH] D120894: [AArch64][SVE]Make better use of gather/scatter when inside a loop body

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 06:48:57 PST 2022


david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:12313
+        for (uint64_t i = 0; i < I->getNumOperands(); i++) {
+          if (isSplatShuffle(I->getOperand(i))) {
+            Ops.push_back(
----------------
I think you might be able to simplify this a little with this:

  auto OpI = I->getOperand(i);
  if (isSplatShuffle(OpI))
    Ops.push_back(&cast<Instruction>(OpI)->getOperandUse(0));
  Ops.push_back(&I->getOperandUse(i));


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120894



More information about the llvm-commits mailing list