[llvm] [InstCombine] Transform (fcmp + fadd + sel) into (fcmp + sel + fadd) (PR #106492)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 01:10:35 PDT 2024


================
@@ -4067,6 +4112,10 @@ Instruction *InstCombinerImpl::visitSelectInst(SelectInst &SI) {
   if (Value *V = foldRoundUpIntegerWithPow2Alignment(SI, Builder))
     return replaceInstUsesWith(SI, V);
 
+  if (Value *V = foldSelectAddConstant(SI, Builder)) {
+    return replaceInstUsesWith(SI, V);
+  }
----------------
arsenm wrote:

Don't need braces 

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


More information about the llvm-commits mailing list