[PATCH] D143437: [llvm] Use pointer index type for more GEP offsets (pre-codegen)

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 10:40:30 PST 2023


jrtc27 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:1067
     // arithmetic operations if the target uses alias analysis in codegen.
-    if (TTI.useAA())
+    bool IsFatPointer = DL->getPointerSizeInBits(AddrSpace) !=
+                        DL->getIndexSizeInBits(AddrSpace);
----------------
arsenm wrote:
> jrtc27 wrote:
> > Why is AddrSpace before the comment but IsFatPointer after?
> Don't know what FatPointer is meaning here, but isNonIntegralAddressSpace should cover it?
Non-integral is overly strong, it also implies instability of the value if converted to an integer multiple times, which is not true of CHERI, nor AMDGPU AFAIK


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143437



More information about the llvm-commits mailing list