@@ -79,6 +79,82 @@ define float @test_fmax_1_25_neg_2_xorsign_abs_f() {
7979 ret float %res
8080}
8181
82+ ;###############################################################
83+ ;# FMax(+Subnormal, 0.0) #
84+ ;###############################################################
85+
86+ define double @test_fmax_pos_subnorm_zero_d () {
87+ ; CHECK-LABEL: define double @test_fmax_pos_subnorm_zero_d() {
88+ ; CHECK-NEXT: ret double 0x380FFFFFC0000000
89+ ;
90+ %res = call double @llvm.nvvm.fmax.d (double 0x380FFFFFC0000000 , double 0 .0 )
91+ ret double %res
92+ }
93+
94+ define float @test_fmax_pos_subnorm_zero_f () {
95+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_f() {
96+ ; CHECK-NEXT: ret float 0x380FFFFFC0000000
97+ ;
98+ %res = call float @llvm.nvvm.fmax.f (float 0x380FFFFFC0000000 , float 0 .0 )
99+ ret float %res
100+ }
101+
102+ define float @test_fmax_pos_subnorm_zero_ftz_f () {
103+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_ftz_f() {
104+ ; CHECK-NEXT: ret float 0.000000e+00
105+ ;
106+ %res = call float @llvm.nvvm.fmax.ftz.f (float 0x380FFFFFC0000000 , float 0 .0 )
107+ ret float %res
108+ }
109+
110+ define float @test_fmax_pos_subnorm_zero_ftz_nan_f () {
111+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_ftz_nan_f() {
112+ ; CHECK-NEXT: ret float 0.000000e+00
113+ ;
114+ %res = call float @llvm.nvvm.fmax.ftz.nan.f (float 0x380FFFFFC0000000 , float 0 .0 )
115+ ret float %res
116+ }
117+
118+ define float @test_fmax_pos_subnorm_zero_ftz_nan_xorsign_abs_f () {
119+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_ftz_nan_xorsign_abs_f() {
120+ ; CHECK-NEXT: ret float 0.000000e+00
121+ ;
122+ %res = call float @llvm.nvvm.fmax.ftz.nan.xorsign.abs.f (float 0x380FFFFFC0000000 , float 0 .0 )
123+ ret float %res
124+ }
125+
126+ define float @test_fmax_pos_subnorm_zero_ftz_xorsign_abs_f () {
127+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_ftz_xorsign_abs_f() {
128+ ; CHECK-NEXT: ret float 0.000000e+00
129+ ;
130+ %res = call float @llvm.nvvm.fmax.ftz.xorsign.abs.f (float 0x380FFFFFC0000000 , float 0 .0 )
131+ ret float %res
132+ }
133+
134+ define float @test_fmax_pos_subnorm_zero_nan_f () {
135+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_nan_f() {
136+ ; CHECK-NEXT: ret float 0x380FFFFFC0000000
137+ ;
138+ %res = call float @llvm.nvvm.fmax.nan.f (float 0x380FFFFFC0000000 , float 0 .0 )
139+ ret float %res
140+ }
141+
142+ define float @test_fmax_pos_subnorm_zero_nan_xorsign_abs_f () {
143+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_nan_xorsign_abs_f() {
144+ ; CHECK-NEXT: ret float 0x380FFFFFC0000000
145+ ;
146+ %res = call float @llvm.nvvm.fmax.nan.xorsign.abs.f (float 0x380FFFFFC0000000 , float 0 .0 )
147+ ret float %res
148+ }
149+
150+ define float @test_fmax_pos_subnorm_zero_xorsign_abs_f () {
151+ ; CHECK-LABEL: define float @test_fmax_pos_subnorm_zero_xorsign_abs_f() {
152+ ; CHECK-NEXT: ret float 0x380FFFFFC0000000
153+ ;
154+ %res = call float @llvm.nvvm.fmax.xorsign.abs.f (float 0x380FFFFFC0000000 , float 0 .0 )
155+ ret float %res
156+ }
157+
82158;###############################################################
83159;# FMax(+Subnormal, -Subnormal) #
84160;###############################################################
@@ -460,6 +536,82 @@ define float @test_fmin_1_25_neg_2_xorsign_abs_f() {
460536 ret float %res
461537}
462538
539+ ;###############################################################
540+ ;# FMin(-Subnormal, 0.0) #
541+ ;###############################################################
542+
543+ define double @test_fmin_neg_subnorm_zero_d () {
544+ ; CHECK-LABEL: define double @test_fmin_neg_subnorm_zero_d() {
545+ ; CHECK-NEXT: ret double 0xB80FFFFFC0000000
546+ ;
547+ %res = call double @llvm.nvvm.fmin.d (double 0xB80FFFFFC0000000 , double 0 .0 )
548+ ret double %res
549+ }
550+
551+ define float @test_fmin_neg_subnorm_zero_f () {
552+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_f() {
553+ ; CHECK-NEXT: ret float 0xB80FFFFFC0000000
554+ ;
555+ %res = call float @llvm.nvvm.fmin.f (float 0xB80FFFFFC0000000 , float 0 .0 )
556+ ret float %res
557+ }
558+
559+ define float @test_fmin_neg_subnorm_zero_ftz_f () {
560+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_ftz_f() {
561+ ; CHECK-NEXT: ret float -0.000000e+00
562+ ;
563+ %res = call float @llvm.nvvm.fmin.ftz.f (float 0xB80FFFFFC0000000 , float 0 .0 )
564+ ret float %res
565+ }
566+
567+ define float @test_fmin_neg_subnorm_zero_ftz_nan_f () {
568+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_ftz_nan_f() {
569+ ; CHECK-NEXT: ret float -0.000000e+00
570+ ;
571+ %res = call float @llvm.nvvm.fmin.ftz.nan.f (float 0xB80FFFFFC0000000 , float 0 .0 )
572+ ret float %res
573+ }
574+
575+ define float @test_fmin_neg_subnorm_zero_ftz_nan_xorsign_abs_f () {
576+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_ftz_nan_xorsign_abs_f() {
577+ ; CHECK-NEXT: ret float -0.000000e+00
578+ ;
579+ %res = call float @llvm.nvvm.fmin.ftz.nan.xorsign.abs.f (float 0xB80FFFFFC0000000 , float 0 .0 )
580+ ret float %res
581+ }
582+
583+ define float @test_fmin_neg_subnorm_zero_ftz_xorsign_abs_f () {
584+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_ftz_xorsign_abs_f() {
585+ ; CHECK-NEXT: ret float -0.000000e+00
586+ ;
587+ %res = call float @llvm.nvvm.fmin.ftz.xorsign.abs.f (float 0xB80FFFFFC0000000 , float 0 .0 )
588+ ret float %res
589+ }
590+
591+ define float @test_fmin_neg_subnorm_zero_nan_f () {
592+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_nan_f() {
593+ ; CHECK-NEXT: ret float 0xB80FFFFFC0000000
594+ ;
595+ %res = call float @llvm.nvvm.fmin.nan.f (float 0xB80FFFFFC0000000 , float 0 .0 )
596+ ret float %res
597+ }
598+
599+ define float @test_fmin_neg_subnorm_zero_nan_xorsign_abs_f () {
600+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_nan_xorsign_abs_f() {
601+ ; CHECK-NEXT: ret float -0.000000e+00
602+ ;
603+ %res = call float @llvm.nvvm.fmin.nan.xorsign.abs.f (float 0xB80FFFFFC0000000 , float 0 .0 )
604+ ret float %res
605+ }
606+
607+ define float @test_fmin_neg_subnorm_zero_xorsign_abs_f () {
608+ ; CHECK-LABEL: define float @test_fmin_neg_subnorm_zero_xorsign_abs_f() {
609+ ; CHECK-NEXT: ret float -0.000000e+00
610+ ;
611+ %res = call float @llvm.nvvm.fmin.xorsign.abs.f (float 0xB80FFFFFC0000000 , float 0 .0 )
612+ ret float %res
613+ }
614+
463615;###############################################################
464616;# FMin(+Subnormal, -Subnormal) #
465617;###############################################################
0 commit comments