[PATCH] D117201: [ConstantHoist] Remove check for notional overindexing
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 12:51:48 PST 2022
efriedma added a comment.
There are a few different properties isGEPWithNoNotionalOverIndexing checks for:
1. We have a GEP constant expression.
2. All the operands beyond the first are undef or ConstantInt.
3. All the integer indexes are in bounds.
The replacement checks:
1. We have a GEP constant expression.
2. All the operands beyond the first are ConstantInt.
So basically, this is just removing the third condition.
accumulateConstantOffset already checks that all the operands are ConstantInt, so the second condition is redundant; should be fine to just check `isa<GEPOperator>`, I think.
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117201/new/
https://reviews.llvm.org/D117201
More information about the llvm-commits
mailing list