[llvm] [SCCP] Remove masking operations (PR #142736)
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jun  4 03:06:32 PDT 2025
    
    
  
================
@@ -232,6 +234,33 @@ static bool replaceSignedInst(SCCPSolver &Solver,
   return true;
 }
 
+/// Try to use \p Inst's value range from \p Solver to simplify it.
+static Value *simplifyInstruction(SCCPSolver &Solver,
+                                  SmallPtrSetImpl<Value *> &InsertedValues,
+                                  Instruction &Inst) {
+  auto GetRange = [&Solver, &InsertedValues](Value *Op) {
----------------
fhahn wrote:
We should probably unify this, the same code is also used in `refineInstruction` and `replaceSignedInst` in a slightly different variant.
https://github.com/llvm/llvm-project/pull/142736
    
    
More information about the llvm-commits
mailing list