[PATCH] D112922: [ARM] Treat MVE gather add-like-or's like adds
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 03:28:50 PDT 2021
dmgreen added inline comments.
================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:364
+static bool isAddLikeOr(Instruction *I, const DataLayout &DL) {
+ return I->getOpcode() == Instruction::Or &&
----------------
samtebbs wrote:
> 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.
Will do. I got the name from some similar functions in the arm tablegen backend, but adding a comment sounds good.
================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:1078
case Instruction::Add:
+ case Instruction::Or:
pushOutAdd(NewPhi, OffsSecondOperand, IncrementingBlock == 1 ? 0 : 1);
----------------
samtebbs wrote:
> Does this need to check if the OR is add-like?
This one is fine (I'm pretty sure), because we have already checked the type above.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112922/new/
https://reviews.llvm.org/D112922
More information about the llvm-commits
mailing list