[PATCH] D117201: [ConstantHoist] Remove check for notional overindexing
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 14 10:29:42 PST 2022
efriedma added a comment.
In D117201#3243101 <https://reviews.llvm.org/D117201#3243101>, @nikic wrote:
>> If we stop checking for over-indexing, do we need to worry about "inbounds" markings? Before this patch, all the transformed GEPs were effectively inbounds, but with this patch they aren't.
>
> I don't think so. We're just hoisting address arithmetic here, it should not matter whether it is inbounds or not.
I'm not saying the transformation inherently cares about "inbounds".
The case I'm worried about is the case where we choose an "inbounds" GEP as the base, but it's poison because it's out of bounds. We do the transform, then all the other transformed GEPs are poisoned. I think we could solve this by generating a new constant expression for the base that isn't marked "inbounds". Currently, we just reuse the existing constant expression.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117201/new/
https://reviews.llvm.org/D117201
More information about the llvm-commits
mailing list