[llvm] r363175 - [InstCombine] add tests for fmin/fmax libcalls; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 08:29:40 PDT 2019


Author: spatel
Date: Wed Jun 12 08:29:40 2019
New Revision: 363175

URL: http://llvm.org/viewvc/llvm-project?rev=363175&view=rev
Log:
[InstCombine] add tests for fmin/fmax libcalls; NFC

Modified:
    llvm/trunk/test/Transforms/InstCombine/fast-math.ll

Modified: llvm/trunk/test/Transforms/InstCombine/fast-math.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/fast-math.ll?rev=363175&r1=363174&r2=363175&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/fast-math.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/fast-math.ll Wed Jun 12 08:29:40 2019
@@ -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:%.*]]




More information about the llvm-commits mailing list