[PATCH] D87227: [SVE] Fix isLoadInvariantInLoop for scalable vectors

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 03:39:15 PDT 2020


sdesmalen added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfoImpl.h:818
+          // vscale and the target must be able to cope with that.
+          Scale = ElementSize.getKnownMinSize();
         }
----------------
david-arm wrote:
> sdesmalen wrote:
> > It is probably important for `isLegalAddressingMode` to know whether the Offset and/or Scale is a multiple of vscale, so it makes sense to encode that in a TypeSize. I would prefer to either keep the warning or make isLegalAddressingMode accept a TypeSize, instead of explicitly removing the 'vscale' information here and replacing the warning with a TODO.
> OK I'll make the change to isLegalAddressingMode in a separate patch to support compound BaseOffsets that are true polynomials, i.e. pass a BaseOffset and a ScaledBaseOffset to isLegalAddressingMode.
I don't think it needs to be support compound BaseOffsets that are true polynomials. Because scalable vectors are not allowed as members of structs, we can't construct a gep that leads to a compound offset with both unscaled and vscale'd parts.


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

https://reviews.llvm.org/D87227



More information about the llvm-commits mailing list