[llvm] [DAG] computeKnownFPClass - add ISD::SINT_TO_FP/UINT_TO_FP handling (PR #190539)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 03:40:29 PDT 2026


================
@@ -22,6 +22,287 @@ define i8 @iszero_constant_v4f32() nounwind {
   ret i8 %r
 }
 
+define i1 @uitofp_isnan(i32 %x) {
+; CHECK-LABEL: uitofp_isnan:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    li a0, 0
+; CHECK-NEXT:    ret
+  %f = uitofp i32 %x to float
+  %res = call i1 @llvm.is.fpclass.f32(float %f, i32 3) ; 3 = nan
----------------
RKSimon wrote:

can we reduce the number of tests by merging some of the interested class masks more? afaict only some of the nonzero style tests need to be kept seperate

https://github.com/llvm/llvm-project/pull/190539


More information about the llvm-commits mailing list