[llvm] [SROA] analyze gep(ptr,phi(const...)) (PR #82425)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 23:14:27 PST 2024


================
@@ -4070,12 +4070,67 @@ class AggLoadStoreRewriter : public InstVisitor<AggLoadStoreRewriter, bool> {
     return true;
   }
 
+  bool foldGEPPhiConst(GetElementPtrInst &GEPI) {
----------------
aeubanks wrote:

can we copy `foldGEPSelect` and handle both gep(phi(ptr), idx) and gep(ptr, phi(idx)) in one function? and also handle GEPs with more than one index

https://github.com/llvm/llvm-project/pull/82425


More information about the llvm-commits mailing list