[PATCH] D112922: [ARM] Treat MVE gather add-like-or's like adds
Sam Tebbs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 03:20:20 PDT 2021
samtebbs accepted this revision.
samtebbs added a comment.
This revision is now accepted and ready to land.
LGTM with a couple of comments.
================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:364
+static bool isAddLikeOr(Instruction *I, const DataLayout &DL) {
+ return I->getOpcode() == Instruction::Or &&
----------------
Without context, I think this function name reads as "add like an or", rather than "add-like or". I think it would be good to add a comment above it or rename it to `isOrLikeAnAdd` to emphasise that it's an or that is add-like.
================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:1078
case Instruction::Add:
+ case Instruction::Or:
pushOutAdd(NewPhi, OffsSecondOperand, IncrementingBlock == 1 ? 0 : 1);
----------------
Does this need to check if the OR is add-like?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112922/new/
https://reviews.llvm.org/D112922
More information about the llvm-commits
mailing list