Skip to content

Commit e62038e

Browse files
committed
add and update fmf tests
1 parent a5d953d commit e62038e

File tree

1 file changed

+44
-0
lines changed
  • llvm/test/Transforms/InstCombine

1 file changed

+44
-0
lines changed

llvm/test/Transforms/InstCombine/fcmp.ll

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,3 +1718,47 @@ define i1 @fcmp_one_sel_x_negx_with_fmf(float %x, i1 %c) {
17181718
%res = fcmp fast one float %sel, 0.000000e+00
17191719
ret i1 %res
17201720
}
1721+
1722+
define i1 @fcmp_ueq_sel_x_negx_nzero_with_fmf(float %x, i1 %c) {
1723+
; CHECK-LABEL: @fcmp_ueq_sel_x_negx_nzero_with_fmf(
1724+
; CHECK-NEXT: [[RES:%.*]] = fcmp fast ueq float [[X:%.*]], 0.000000e+00
1725+
; CHECK-NEXT: ret i1 [[RES]]
1726+
;
1727+
%neg = fneg float %x
1728+
%sel = select i1 %c, float %x, float %neg
1729+
%res = fcmp fast ueq float %sel, -0.000000e+00
1730+
ret i1 %res
1731+
}
1732+
1733+
define i1 @fcmp_une_sel_x_negx_nzero_with_fmf(float %x, i1 %c) {
1734+
; CHECK-LABEL: @fcmp_une_sel_x_negx_nzero_with_fmf(
1735+
; CHECK-NEXT: [[RES:%.*]] = fcmp fast une float [[X:%.*]], 0.000000e+00
1736+
; CHECK-NEXT: ret i1 [[RES]]
1737+
;
1738+
%neg = fneg float %x
1739+
%sel = select i1 %c, float %x, float %neg
1740+
%res = fcmp fast une float %sel, -0.000000e+00
1741+
ret i1 %res
1742+
}
1743+
1744+
define i1 @fcmp_oeq_sel_x_negx_nzero_with_fmf(float %x, i1 %c) {
1745+
; CHECK-LABEL: @fcmp_oeq_sel_x_negx_nzero_with_fmf(
1746+
; CHECK-NEXT: [[RES:%.*]] = fcmp fast oeq float [[X:%.*]], 0.000000e+00
1747+
; CHECK-NEXT: ret i1 [[RES]]
1748+
;
1749+
%neg = fneg float %x
1750+
%sel = select i1 %c, float %x, float %neg
1751+
%res = fcmp fast oeq float %sel, -0.000000e+00
1752+
ret i1 %res
1753+
}
1754+
1755+
define i1 @fcmp_one_sel_x_negx_nzero_with_fmf(float %x, i1 %c) {
1756+
; CHECK-LABEL: @fcmp_one_sel_x_negx_nzero_with_fmf(
1757+
; CHECK-NEXT: [[RES:%.*]] = fcmp fast one float [[X:%.*]], 0.000000e+00
1758+
; CHECK-NEXT: ret i1 [[RES]]
1759+
;
1760+
%neg = fneg float %x
1761+
%sel = select i1 %c, float %x, float %neg
1762+
%res = fcmp fast one float %sel, -0.000000e+00
1763+
ret i1 %res
1764+
}

0 commit comments

Comments
 (0)