[llvm] [InstCombine] Fold `select (A &/| B), T, F` if `select B, T, F` is foldable (PR #76621)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 30 13:16:35 PST 2023


================
@@ -1171,14 +1171,15 @@ static Value *foldSelectCttzCtlz(ICmpInst *ICI, Value *TrueVal, Value *FalseVal,
   return nullptr;
 }
 
-static Instruction *canonicalizeSPF(SelectInst &Sel, ICmpInst &Cmp,
-                                    InstCombinerImpl &IC) {
+static Value *canonicalizeSPF(ICmpInst &Cmp, Value *TrueVal, Value *FalseVal,
----------------
nikic wrote:

Please directly commit this refactoring.

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


More information about the llvm-commits mailing list