File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3922,6 +3922,21 @@ define i1 @test_class_is_not_psub_pnorm_pinf__dynamic(float %arg) #3 {
39223922 ret i1 %class
39233923}
39243924
3925+ ; Make sure we don't take sign bit from NaN operands.
3926+
3927+ define i1 @minnum_qnan (i32 %x ) {
3928+ ; CHECK-LABEL: @minnum_qnan(
3929+ ; CHECK-NEXT: entry:
3930+ ; CHECK-NEXT: ret i1 false
3931+ ;
3932+ entry:
3933+ %qnan_bits = or i32 %x , -5938
3934+ %qnan = bitcast i32 %qnan_bits to float
3935+ %min = call float @llvm.minnum.f32 (float %qnan , float 0 .000000e+00 )
3936+ %test = call i1 @llvm.is.fpclass.f32 (float %min , i32 64 )
3937+ ret i1 %test
3938+ }
3939+
39253940declare i1 @llvm.is.fpclass.f32 (float , i32 immarg)
39263941declare i1 @llvm.is.fpclass.f64 (double , i32 immarg)
39273942declare <2 x i1 > @llvm.is.fpclass.v2f32 (<2 x float >, i32 immarg)
You can’t perform that action at this time.
0 commit comments