[PATCH] D101245: [GlobalOpt] Disable heap SROA when GEP of the only storer is used
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 27 09:14:00 PDT 2021
MaskRay added a comment.
In D101245#2717561 <https://reviews.llvm.org/D101245#2717561>, @aeubanks wrote:
> I'm not familiar with the terminology of "storer", so the description is confusing to me.
I mean the instruction which stores to the malloc return value. I don't know an appropriate term.
> Trying to understand the test case and description, is the issue that Heap SROA isn't handling a store of the entire struct (as opposed to initializing the struct element by element)?
If the malloc allocates an array, say `{a, b}{a, b}{a, b}{a, b}`. The heap SROA makes it `[a,a,a,a] [b,b,b,b]` (i.e. elements are shuffled).
With GEP poking different indexes, this can either cause misoptimizations or trigger assertion failures. PR50027 is an assertion failure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101245/new/
https://reviews.llvm.org/D101245
More information about the llvm-commits
mailing list