From ca0b43a08cc42fb7fd3250b24b47ec5d5bbc397a Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Wed, 12 Jun 2019 15:29:40 +0000 Subject: [PATCH] [InstCombine] add tests for fmin/fmax libcalls; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363175 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/fast-math.ll | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/Transforms/InstCombine/fast-math.ll b/test/Transforms/InstCombine/fast-math.ll index 3e7af3e7838..632d178412f 100644 --- a/test/Transforms/InstCombine/fast-math.ll +++ b/test/Transforms/InstCombine/fast-math.ll @@ -830,6 +830,15 @@ define float @max1(float %a, float %b) { ret float %f } +define float @fmax_no_fmf(float %a, float %b) { +; CHECK-LABEL: @fmax_no_fmf( +; CHECK-NEXT: [[C:%.*]] = call float @fmaxf(float [[A:%.*]], float [[B:%.*]]) +; CHECK-NEXT: ret float [[C]] +; + %c = call float @fmaxf(float %a, float %b) + ret float %c +} + define float @max2(float %a, float %b) { ; CHECK-LABEL: @max2( ; CHECK-NEXT: [[TMP1:%.*]] = fcmp nnan nsz ogt float [[A:%.*]], [[B:%.*]] @@ -875,6 +884,15 @@ define float @min1(float %a, float %b) { ret float %f } +define float @fmin_no_fmf(float %a, float %b) { +; CHECK-LABEL: @fmin_no_fmf( +; CHECK-NEXT: [[C:%.*]] = call float @fminf(float [[A:%.*]], float [[B:%.*]]) +; CHECK-NEXT: ret float [[C]] +; + %c = call float @fminf(float %a, float %b) + ret float %c +} + define float @min2(float %a, float %b) { ; CHECK-LABEL: @min2( ; CHECK-NEXT: [[TMP1:%.*]] = fcmp fast olt float [[A:%.*]], [[B:%.*]] -- 2.40.0