[llvm] [InstCombine] Fold `fcmp pred sqrt(X), 0.0 -> fcmp pred2 X, 0.0` (PR #101626)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 09:54:25 PDT 2024
================
@@ -2266,6 +2296,17 @@ define i1 @fcmp_sqrt_zero_uno(half %x) {
ret i1 %cmp
}
+; Make sure that ninf is cleared.
+define i1 @fcmp_sqrt_zero_uno_fmf(half %x) {
+; CHECK-LABEL: @fcmp_sqrt_zero_uno_fmf(
+; CHECK-NEXT: [[CMP:%.*]] = fcmp ult half [[X:%.*]], 0xH0000
+; CHECK-NEXT: ret i1 [[CMP]]
+;
+ %sqrt = call half @llvm.sqrt(half %x)
----------------
dtcxzyw wrote:
Done.
https://github.com/llvm/llvm-project/pull/101626
More information about the llvm-commits
mailing list