@@ -463,6 +463,40 @@ define i1 @test18(float %x, float %y, float %z) {
463463 ret i1 %5
464464}
465465
466+ define i1 @test_fminimum_num (float %x , float %y , float %z ) {
467+ ; CHECK-LABEL: @test_fminimum_num(
468+ ; CHECK-NEXT: [[TMP1:%.*]] = fpext float [[X:%.*]] to double
469+ ; CHECK-NEXT: [[TMP2:%.*]] = fpext float [[Y:%.*]] to double
470+ ; CHECK-NEXT: [[TMP3:%.*]] = call double @fminimum_num(double [[TMP1]], double [[TMP2]]) #[[ATTR3:[0-9]+]]
471+ ; CHECK-NEXT: [[TMP4:%.*]] = fpext float [[Z:%.*]] to double
472+ ; CHECK-NEXT: [[TMP5:%.*]] = fcmp oeq double [[TMP3]], [[TMP4]]
473+ ; CHECK-NEXT: ret i1 [[TMP5]]
474+ ;
475+ %1 = fpext float %x to double
476+ %2 = fpext float %y to double
477+ %3 = call double @fminimum_num (double %1 , double %2 ) nounwind
478+ %4 = fpext float %z to double
479+ %5 = fcmp oeq double %3 , %4
480+ ret i1 %5
481+ }
482+
483+ define i1 @test_fmaximum_num (float %x , float %y , float %z ) {
484+ ; CHECK-LABEL: @test_fmaximum_num(
485+ ; CHECK-NEXT: [[TMP1:%.*]] = fpext float [[X:%.*]] to double
486+ ; CHECK-NEXT: [[TMP2:%.*]] = fpext float [[Y:%.*]] to double
487+ ; CHECK-NEXT: [[TMP3:%.*]] = call double @fmaximum_num(double [[TMP1]], double [[TMP2]]) #[[ATTR3]]
488+ ; CHECK-NEXT: [[TMP4:%.*]] = fpext float [[Z:%.*]] to double
489+ ; CHECK-NEXT: [[TMP5:%.*]] = fcmp oeq double [[TMP3]], [[TMP4]]
490+ ; CHECK-NEXT: ret i1 [[TMP5]]
491+ ;
492+ %1 = fpext float %x to double
493+ %2 = fpext float %y to double
494+ %3 = call double @fmaximum_num (double %1 , double %2 ) nounwind
495+ %4 = fpext float %z to double
496+ %5 = fcmp oeq double %3 , %4
497+ ret i1 %5
498+ }
499+
466500define i1 @test19 (float %x , float %y , float %z ) {
467501; CHECK-LABEL: @test19(
468502; CHECK-NEXT: [[COPYSIGNF:%.*]] = call float @copysignf(float [[X:%.*]], float [[Y:%.*]]) #[[ATTR0:[0-9]+]]
@@ -518,6 +552,8 @@ declare double @roundeven(double) nounwind readnone
518552declare double @trunc (double ) nounwind readnone
519553declare double @fmin (double , double ) nounwind readnone
520554declare double @fmax (double , double ) nounwind readnone
555+ declare double @fminimum_num (double , double ) nounwind readnone
556+ declare double @fmaximum_num (double , double ) nounwind readnone
521557
522558declare double @llvm.fabs.f64 (double ) nounwind readnone
523559declare double @llvm.ceil.f64 (double ) nounwind readnone
0 commit comments