[PATCH] D119728: [AArch64][SVE] Handle more cases in findMoreOptimalIndexType.
    Paul Walker via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Feb 24 07:46:56 PST 2022
    
    
  
paulwalker-arm accepted this revision.
paulwalker-arm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16471
+  //   BasePtr = Ptr + (Offset << Shift) * scale)
+  //   Index = X << shift
   if (Index.getOpcode() == ISD::SHL &&
----------------
Perhaps `splat(Shift)` to keep the before and after consistent.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16523
+      int64_t Step = (int64_t)NewIndex.getOperand(0).getConstantOperandVal(1);
+      Stride = Step << Shift->getSExtValue();
+    }
----------------
`getZExtValue`? Shift amounts are always unsigned.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119728/new/
https://reviews.llvm.org/D119728
    
    
More information about the llvm-commits
mailing list