[llvm] [LoopFlatten] Recognise gep+gep (PR #72515)
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Nov 16 07:08:22 PST 2023
    
    
  
================
@@ -207,6 +207,12 @@ struct FlattenInfo {
         match(MatchedMul, m_c_Mul(m_Trunc(m_Specific(OuterInductionPHI)),
                                   m_Value(MatchedItCount)));
 
+    // Matches the pattern ptr+i*M+j, with the two additions being done via GEP.
+    bool IsGEP = match(U, m_GEP(m_GEP(m_Value(), m_Value(MatchedMul)),
----------------
fhahn wrote:
Wouldn't it be better to just use SCEV here instead of having various manual patterns?
https://github.com/llvm/llvm-project/pull/72515
    
    
More information about the llvm-commits
mailing list