[PATCH] D72330: [ARM][MVE] Enable masked gathers from base + vector of offsets
Anna Welker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 08:02:36 PST 2020
anwel marked 3 inline comments as done.
anwel added inline comments.
================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:197
Value *Load = nullptr;
- // Look through bitcast instruction if #elements is the same
- if (auto *BitCast = dyn_cast<BitCastInst>(Ptr)) {
- Type *BCTy = BitCast->getType();
- Type *BCSrcTy = BitCast->getOperand(0)->getType();
- if (BCTy->getVectorNumElements() == BCSrcTy->getVectorNumElements()) {
- LLVM_DEBUG(dbgs() << "masked gathers: looking through bitcast\n");
- Ptr = BitCast->getOperand(0);
- }
+ if (!createMaskedGatherOffset(Load, Builder))
+ if (!createMaskedGatherBase(Load, Builder))
----------------
dmgreen wrote:
> These could be `Value *MVEGatherScatterLowering::tryCreateMaskedGatherOffset` and return nullptr on failure. It could then look something like:
> ```
> Value *Load = tryCreateMaskedGatherOffset(Builder, Ty, Ptr, Mask);
> if (!Load)
> Load = tryCreateMaskedGatherBase(Builder, Ty, Ptr, Mask);
> if (!Load)
> return false;
> ```
Yes, that makes one less argument to the function
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72330/new/
https://reviews.llvm.org/D72330
More information about the llvm-commits
mailing list