[llvm] [CVP] Remove Zero-Index GEP (PR #144831)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 23:12:02 PDT 2025
================
@@ -1252,6 +1253,23 @@ static bool processTrunc(TruncInst *TI, LazyValueInfo *LVI) {
return Changed;
}
+// remove a GEP if all indices are in range [0, 1)
+static bool processGEP(GetElementPtrInst *GEP, LazyValueInfo *LVI) {
+ for (unsigned i = 1, e = GEP->getNumOperands(); i != e; ++i) {
----------------
dtcxzyw wrote:
```suggestion
for (unsigned I = 1, E = GEP->getNumOperands(); I != E; ++I) {
```
https://github.com/llvm/llvm-project/pull/144831
More information about the llvm-commits
mailing list