[llvm] [InstCombine] Relax guard against FP min/max in select fold (PR #143144)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 08:15:57 PDT 2025


================
@@ -268,3 +268,14 @@ define i1 @test_fcmp_select_var_const_unordered(double %x, double %y) {
   %cmp2 = fcmp ugt double %sel, 0x3E80000000000000
   ret i1 %cmp2
 }
+
+define i1 @test_fcmp_ord_select_fcmp_oeq_var_const(double %x) {
+; CHECK-LABEL:    @test_fcmp_ord_select_fcmp_oeq_var_const(
+; CHECK-NEXT:     [[CMP1:%.*]] = fcmp oeq double [[X:%.*]], 0.000000e+00
----------------
nikic wrote:

```suggestion
; CHECK-NEXT:     [[CMP1:%.*]] = fcmp oeq double [[X:%.*]], 1.000000e+00
```
The test is failing on CI...

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


More information about the llvm-commits mailing list