[llvm] [InstCombine] Handle isNanOrInf idioms (PR #80414)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 3 07:05:58 PST 2024
================
@@ -75,6 +75,32 @@ define i1 @f32_fcnan(float %a) {
ret i1 %res
}
+define i1 @f32_fcnan_fcinf_strictfp(float %a) strictfp {
+; CHECK-LABEL: define i1 @f32_fcnan_fcinf_strictfp(
+; CHECK-SAME: float [[A:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-NEXT: [[TMP1:%.*]] = call float @llvm.fabs.f32(float [[A]])
+; CHECK-NEXT: [[CMP:%.*]] = fcmp ueq float [[TMP1]], 0x7FF0000000000000
----------------
arsenm wrote:
this shows a bug, we're not emitting a strict compare. doesn't need to be fixed in this patch though, existing issue
https://github.com/llvm/llvm-project/pull/80414
More information about the llvm-commits
mailing list