[llvm] 2e604d2 - [Analysis] findAffectedValues - remove unused ConstantInt argument. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 07:00:18 PDT 2020


Author: Simon Pilgrim
Date: 2020-10-13T14:35:18+01:00
New Revision: 2e604d23b42e2b59b8884c7b4c2f27b62cba5fe3

URL: https://github.com/llvm/llvm-project/commit/2e604d23b42e2b59b8884c7b4c2f27b62cba5fe3
DIFF: https://github.com/llvm/llvm-project/commit/2e604d23b42e2b59b8884c7b4c2f27b62cba5fe3.diff

LOG: [Analysis] findAffectedValues - remove unused ConstantInt argument. NFCI.

We can use m_ConstantInt without a result value as we don't ever use it.

Added: 
    

Modified: 
    llvm/lib/Analysis/AssumptionCache.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/AssumptionCache.cpp b/llvm/lib/Analysis/AssumptionCache.cpp
index bc0cdc4c4c77..fdde5eac16b7 100644
--- a/llvm/lib/Analysis/AssumptionCache.cpp
+++ b/llvm/lib/Analysis/AssumptionCache.cpp
@@ -102,13 +102,12 @@ findAffectedValues(CallInst *CI,
         }
 
         Value *B;
-        ConstantInt *C;
         // (A & B) or (A | B) or (A ^ B).
         if (match(V, m_BitwiseLogic(m_Value(A), m_Value(B)))) {
           AddAffected(A);
           AddAffected(B);
         // (A << C) or (A >>_s C) or (A >>_u C) where C is some constant.
-        } else if (match(V, m_Shift(m_Value(A), m_ConstantInt(C)))) {
+        } else if (match(V, m_Shift(m_Value(A), m_ConstantInt()))) {
           AddAffected(A);
         }
       };


        


More information about the llvm-commits mailing list