@@ -1631,13 +1631,90 @@ define <8 x i1> @fcmp_one_sel_x_negx_vec(<8 x float> %x) {
1631
1631
ret <8 x i1 > %res
1632
1632
}
1633
1633
1634
- define i1 @fcmp_sel_x_negx_with_any_cond (float %x , i1 %c ) {
1635
- ; CHECK-LABEL: @fcmp_sel_x_negx_with_any_cond(
1636
- ; CHECK-NEXT: [[RES:%.*]] = fcmp ueq float [[X:%.*]], 0.000000e+00
1634
+ define <2 x i1 > @fcmp_oeq_sel_x_negx_with_any_fpzero_vec (<2 x i1 > %cond , <2 x float > %x ) {
1635
+ ; CHECK-LABEL: @fcmp_oeq_sel_x_negx_with_any_fpzero_vec(
1636
+ ; CHECK-NEXT: [[ICMP:%.*]] = fcmp oeq <2 x float> [[X:%.*]], zeroinitializer
1637
+ ; CHECK-NEXT: ret <2 x i1> [[ICMP]]
1638
+ ;
1639
+ %fneg = fneg <2 x float > %x
1640
+ %sel = select <2 x i1 > %cond , <2 x float > %x , <2 x float > %fneg
1641
+ %icmp = fcmp oeq <2 x float > %sel , <float 0 .0 , float -0 .0 >
1642
+ ret <2 x i1 > %icmp
1643
+ }
1644
+
1645
+ define <2 x i1 > @fcmp_one_sel_x_negx_with_any_fpzero_vec (<2 x i1 > %cond , <2 x float > %x ) {
1646
+ ; CHECK-LABEL: @fcmp_one_sel_x_negx_with_any_fpzero_vec(
1647
+ ; CHECK-NEXT: [[ICMP:%.*]] = fcmp one <2 x float> [[X:%.*]], zeroinitializer
1648
+ ; CHECK-NEXT: ret <2 x i1> [[ICMP]]
1649
+ ;
1650
+ %fneg = fneg <2 x float > %x
1651
+ %sel = select <2 x i1 > %cond , <2 x float > %x , <2 x float > %fneg
1652
+ %icmp = fcmp one <2 x float > %sel , <float 0 .0 , float -0 .0 >
1653
+ ret <2 x i1 > %icmp
1654
+ }
1655
+
1656
+ define <2 x i1 > @fcmp_ueq_sel_x_negx_with_any_fpzero_vec (<2 x i1 > %cond , <2 x float > %x ) {
1657
+ ; CHECK-LABEL: @fcmp_ueq_sel_x_negx_with_any_fpzero_vec(
1658
+ ; CHECK-NEXT: [[ICMP:%.*]] = fcmp ueq <2 x float> [[X:%.*]], zeroinitializer
1659
+ ; CHECK-NEXT: ret <2 x i1> [[ICMP]]
1660
+ ;
1661
+ %fneg = fneg <2 x float > %x
1662
+ %sel = select <2 x i1 > %cond , <2 x float > %x , <2 x float > %fneg
1663
+ %icmp = fcmp ueq <2 x float > %sel , <float 0 .0 , float -0 .0 >
1664
+ ret <2 x i1 > %icmp
1665
+ }
1666
+
1667
+ define <2 x i1 > @fcmp_une_sel_x_negx_with_any_fpzero_vec (<2 x i1 > %cond , <2 x float > %x ) {
1668
+ ; CHECK-LABEL: @fcmp_une_sel_x_negx_with_any_fpzero_vec(
1669
+ ; CHECK-NEXT: [[ICMP:%.*]] = fcmp une <2 x float> [[X:%.*]], zeroinitializer
1670
+ ; CHECK-NEXT: ret <2 x i1> [[ICMP]]
1671
+ ;
1672
+ %fneg = fneg <2 x float > %x
1673
+ %sel = select <2 x i1 > %cond , <2 x float > %x , <2 x float > %fneg
1674
+ %icmp = fcmp une <2 x float > %sel , <float 0 .0 , float -0 .0 >
1675
+ ret <2 x i1 > %icmp
1676
+ }
1677
+
1678
+ define i1 @fcmp_ueq_sel_x_negx_with_fmf (float %x , i1 %c ) {
1679
+ ; CHECK-LABEL: @fcmp_ueq_sel_x_negx_with_fmf(
1680
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast ueq float [[X:%.*]], 0.000000e+00
1637
1681
; CHECK-NEXT: ret i1 [[RES]]
1638
1682
;
1639
1683
%neg = fneg float %x
1640
1684
%sel = select i1 %c , float %x , float %neg
1641
- %res = fcmp ueq float %sel , 0 .000000e+00
1685
+ %res = fcmp fast ueq float %sel , 0 .000000e+00
1686
+ ret i1 %res
1687
+ }
1688
+
1689
+ define i1 @fcmp_une_sel_x_negx_with_fmf (float %x , i1 %c ) {
1690
+ ; CHECK-LABEL: @fcmp_une_sel_x_negx_with_fmf(
1691
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast une float [[X:%.*]], 0.000000e+00
1692
+ ; CHECK-NEXT: ret i1 [[RES]]
1693
+ ;
1694
+ %neg = fneg float %x
1695
+ %sel = select i1 %c , float %x , float %neg
1696
+ %res = fcmp fast une float %sel , 0 .000000e+00
1697
+ ret i1 %res
1698
+ }
1699
+
1700
+ define i1 @fcmp_oeq_sel_x_negx_with_fmf (float %x , i1 %c ) {
1701
+ ; CHECK-LABEL: @fcmp_oeq_sel_x_negx_with_fmf(
1702
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast oeq float [[X:%.*]], 0.000000e+00
1703
+ ; CHECK-NEXT: ret i1 [[RES]]
1704
+ ;
1705
+ %neg = fneg float %x
1706
+ %sel = select i1 %c , float %x , float %neg
1707
+ %res = fcmp fast oeq float %sel , 0 .000000e+00
1708
+ ret i1 %res
1709
+ }
1710
+
1711
+ define i1 @fcmp_one_sel_x_negx_with_fmf (float %x , i1 %c ) {
1712
+ ; CHECK-LABEL: @fcmp_one_sel_x_negx_with_fmf(
1713
+ ; CHECK-NEXT: [[RES:%.*]] = fcmp fast one float [[X:%.*]], 0.000000e+00
1714
+ ; CHECK-NEXT: ret i1 [[RES]]
1715
+ ;
1716
+ %neg = fneg float %x
1717
+ %sel = select i1 %c , float %x , float %neg
1718
+ %res = fcmp fast one float %sel , 0 .000000e+00
1642
1719
ret i1 %res
1643
1720
}
0 commit comments