@@ -1516,3 +1516,47 @@ define i1 @fcmp_one_sel_x_negx_with_fmf(float %x, i1 %c) {
1516
1516
%res = fcmp fast one float %sel , 0 .000000e+00
1517
1517
ret i1 %res
1518
1518
}
1519
+
1520
+ define i1 @fcmp_ueq_sel_x_negx_nzero_with_fmf (float %x , i1 %c ) {
1521
+ ; CHECK-LABEL: @fcmp_ueq_sel_x_negx_nzero_with_fmf(
1522
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast ueq float [[X:%.*]], 0.000000e+00
1523
+ ; CHECK-NEXT: ret i1 [[RES]]
1524
+ ;
1525
+ %neg = fneg float %x
1526
+ %sel = select i1 %c , float %x , float %neg
1527
+ %res = fcmp fast ueq float %sel , -0 .000000e+00
1528
+ ret i1 %res
1529
+ }
1530
+
1531
+ define i1 @fcmp_une_sel_x_negx_nzero_with_fmf (float %x , i1 %c ) {
1532
+ ; CHECK-LABEL: @fcmp_une_sel_x_negx_nzero_with_fmf(
1533
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast une float [[X:%.*]], 0.000000e+00
1534
+ ; CHECK-NEXT: ret i1 [[RES]]
1535
+ ;
1536
+ %neg = fneg float %x
1537
+ %sel = select i1 %c , float %x , float %neg
1538
+ %res = fcmp fast une float %sel , -0 .000000e+00
1539
+ ret i1 %res
1540
+ }
1541
+
1542
+ define i1 @fcmp_oeq_sel_x_negx_nzero_with_fmf (float %x , i1 %c ) {
1543
+ ; CHECK-LABEL: @fcmp_oeq_sel_x_negx_nzero_with_fmf(
1544
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast oeq float [[X:%.*]], 0.000000e+00
1545
+ ; CHECK-NEXT: ret i1 [[RES]]
1546
+ ;
1547
+ %neg = fneg float %x
1548
+ %sel = select i1 %c , float %x , float %neg
1549
+ %res = fcmp fast oeq float %sel , -0 .000000e+00
1550
+ ret i1 %res
1551
+ }
1552
+
1553
+ define i1 @fcmp_one_sel_x_negx_nzero_with_fmf (float %x , i1 %c ) {
1554
+ ; CHECK-LABEL: @fcmp_one_sel_x_negx_nzero_with_fmf(
1555
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast one float [[X:%.*]], 0.000000e+00
1556
+ ; CHECK-NEXT: ret i1 [[RES]]
1557
+ ;
1558
+ %neg = fneg float %x
1559
+ %sel = select i1 %c , float %x , float %neg
1560
+ %res = fcmp fast one float %sel , -0 .000000e+00
1561
+ ret i1 %res
1562
+ }
0 commit comments