[PATCH] D118727: [MemoryBuiltins][FIX] Adjust index type size properly wrt. AS casts
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 16:56:22 PST 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Analysis/MemoryBuiltins.cpp:578-583
+ // Stripping pointer casts can strip address space casts which can change the
+ // index type size. The invariant is that we use the value type to determine
+ // the index type size. If we stripped address space casts we "repair" the
+ // APInt as we pass it upwards. For the caller, the APInt matches the type of
+ // the argument value V (or better the type of it).
+ V = V->stripPointerCasts();
----------------
There are several flavors of stripPointerCasts. Why isn't this using stripAndAccumulateConstantOffsets?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118727/new/
https://reviews.llvm.org/D118727
More information about the llvm-commits
mailing list