[PATCH] D103704: [ARM] Extend narrow values to allow using truncating scatters

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 07:47:54 PDT 2021


samtebbs accepted this revision.
samtebbs added a comment.
This revision is now accepted and ready to land.

Looks good to me. It's up to you if you would like to add a comment as mentioned in my reply.



================
Comment at: llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp:641-642
+      InputTy->isIntOrIntVectorTy()) {
+    InputTy = InputTy->getWithNewBitWidth(
+        128 / cast<FixedVectorType>(InputTy)->getNumElements());
+    Input = Builder.CreateZExt(Input, InputTy);
----------------
dmgreen wrote:
> samtebbs wrote:
> > What happens here if `InputTy` is an integer (as I assume is allowed by `isIntOrIntVectorTy()`)?
> We will already have ruled out scalar integer types, we know InputTy will be some sort of vector. So isIntOrIntVectorTy is really just saying "is it an integer vector type"
Cool. It might be worth adding this info as a brief comment.


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

https://reviews.llvm.org/D103704



More information about the llvm-commits mailing list