[PATCH] D61911: [GlobalOpt] Allow dead struct fields in SRA with non constant offset.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 12:35:38 PDT 2019
efriedma added a comment.
The problem here is that the IR semantics don't allow this transform in general.
Even if you've managed to dodge the exact construct from bug 38309 (I'm not sure I understand how, but it's not really relevant), the rules for GEP indexing don't work the way you want them to. "inbounds" just means the result is somewhere within the same global; it doesn't mean that array indexes don't "overflow". See http://llvm.org/docs/LangRef.html#getelementptr-instruction .
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61911/new/
https://reviews.llvm.org/D61911
More information about the llvm-commits
mailing list