Author: Nikita Popov Date: 2021-01-22T21:58:59+01:00 New Revision: fdab28edef35dde906678cd3c3008dd116ea8572
URL: https://github.com/llvm/llvm-project/commit/fdab28edef35dde906678cd3c3008dd116ea8572 DIFF: https://github.com/llvm/llvm-project/commit/fdab28edef35dde906678cd3c3008dd116ea8572.diff LOG: [InstSimplify] Add willreturn to more libcall tests (NFC) Annotate more math libcalls with willreturn. The attribute would have been added by the InferFuncAttrs. Added: Modified: llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll Removed: ################################################################################ diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll b/llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll index b16910b94740..47357ab93615 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/math-1.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -early-cse -earlycse-debug-hash -S -o - %s | FileCheck %s -declare double @acos(double) +declare double @acos(double) #0 define double @f_acos() { ; CHECK-LABEL: @f_acos( ; CHECK-NEXT: ret double 0.000000e+00 @@ -10,7 +10,7 @@ define double @f_acos() { ret double %res } -declare float @asinf(float) +declare float @asinf(float) #0 define float @f_asinf() { ; CHECK-LABEL: @f_asinf( ; CHECK-NEXT: ret float 0x3FF921FB{{.+}} @@ -19,7 +19,7 @@ define float @f_asinf() { ret float %res } -declare double @atan(double) +declare double @atan(double) #0 define double @f_atan() { ; CHECK-LABEL: @f_atan( ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @atan(double 1.000000e+00) @@ -29,7 +29,7 @@ define double @f_atan() { ret double %res } -declare float @cosf(float) +declare float @cosf(float) #0 define float @f_cosf() { ; CHECK-LABEL: @f_cosf( ; CHECK-NEXT: ret float 0x3FE14A2{{.+}} @@ -47,7 +47,7 @@ define float @i_cosf() { ret float %res } -declare double @cosh(double) +declare double @cosh(double) #0 define double @f_cosh() { ; CHECK-LABEL: @f_cosh( ; CHECK-NEXT: ret double 0x3FF8B075{{.+}} @@ -56,7 +56,7 @@ define double @f_cosh() { ret double %res } -declare float @expf(float) +declare float @expf(float) #0 define float @f_expf() { ; CHECK-LABEL: @f_expf( ; CHECK-NEXT: ret float 0x4005BF0A{{.+}} @@ -74,7 +74,7 @@ define float @i_expf() { ret float %res } -declare double @exp2(double) +declare double @exp2(double) #0 define double @f_exp2() { ; CHECK-LABEL: @f_exp2( ; CHECK-NEXT: ret double 2.000000e+00 @@ -93,7 +93,7 @@ define double @i_exp2() { } ; FIXME: exp10() is not widely supported. -declare float @exp10f(float) +declare float @exp10f(float) #0 define float @f_exp10f() { ; CHECK-LABEL: @f_exp10f( ; CHECK-NEXT: [[RES:%.*]] = tail call float @exp10f(float 1.000000e+00) @@ -103,7 +103,7 @@ define float @f_exp10f() { ret float %res } -declare double @log(double) +declare double @log(double) #0 define double @f_log() { ; CHECK-LABEL: @f_log( ; CHECK-NEXT: ret double 0.000000e+00 @@ -121,7 +121,7 @@ define double @i_log() { ret double %res } -declare float @log2f(float) +declare float @log2f(float) #0 define float @f_log2f() { ; CHECK-LABEL: @f_log2f( ; CHECK-NEXT: ret float 0.000000e+00 @@ -139,7 +139,7 @@ define float @i_log2f() { ret float %res } -declare double @log10(double) +declare double @log10(double) #0 define double @f_log10() { ; CHECK-LABEL: @f_log10( ; CHECK-NEXT: ret double 0.000000e+00 @@ -148,7 +148,7 @@ define double @f_log10() { ret double %res } -declare float @sinf(float) +declare float @sinf(float) #0 define float @f_sinf() { ; CHECK-LABEL: @f_sinf( ; CHECK-NEXT: ret float 0x3FEAED54{{.+}} @@ -157,7 +157,7 @@ define float @f_sinf() { ret float %res } -declare double @sinh(double) +declare double @sinh(double) #0 define double @f_sinh() { ; CHECK-LABEL: @f_sinh( ; CHECK-NEXT: ret double 0x3FF2CD9F{{.+}} @@ -166,7 +166,7 @@ define double @f_sinh() { ret double %res } -declare float @sqrtf(float) +declare float @sqrtf(float) #0 define float @f_sqrtf() { ; CHECK-LABEL: @f_sqrtf( ; CHECK-NEXT: ret float 1.000000e+00 @@ -175,7 +175,7 @@ define float @f_sqrtf() { ret float %res } -declare double @tan(double) +declare double @tan(double) #0 define double @f_tan() { ; CHECK-LABEL: @f_tan( ; CHECK-NEXT: ret double 0x3FF8EB24{{.+}} @@ -184,7 +184,7 @@ define double @f_tan() { ret double %res } -declare float @tanhf(float) +declare float @tanhf(float) #0 define float @f_tanhf() { ; CHECK-LABEL: @f_tanhf( ; CHECK-NEXT: [[RES:%.*]] = tail call fast float @tanhf(float 1.000000e+00) @@ -193,3 +193,5 @@ define float @f_tanhf() { %res = tail call fast float @tanhf(float 1.0) ret float %res } + +attributes #0 = { nofree nounwind willreturn } diff --git a/llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll b/llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll index b890fbfd1a2e..3d8f9c34335f 100644 --- a/llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll +++ b/llvm/test/Transforms/InstSimplify/ConstProp/math-2.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -early-cse -earlycse-debug-hash -S -o - %s | FileCheck %s -declare double @atan2(double, double) +declare double @atan2(double, double) #0 define double @f_atan2() { ; CHECK-LABEL: @f_atan2( ; CHECK-NEXT: [[RES:%.*]] = tail call fast double @atan2(double 1.000000e+00, double 2.000000e+00) @@ -11,7 +11,7 @@ define double @f_atan2() { ret double %res } -declare float @fmodf(float, float) +declare float @fmodf(float, float) #0 define float @f_fmodf() { ; CHECK-LABEL: @f_fmodf( ; CHECK-NEXT: ret float 1.000000e+00 @@ -20,7 +20,7 @@ define float @f_fmodf() { ret float %res } -declare float @remainderf(float, float) +declare float @remainderf(float, float) #0 define float @f_remainderf_fold1() { ; CHECK-LABEL: @f_remainderf_fold1( ; CHECK-NEXT: ret float 1.000000e+00 @@ -46,7 +46,7 @@ define float @f_remainderf_nofold() { ret float %res } -declare double @remainder(double, double) +declare double @remainder(double, double) #0 define double @f_remainder_fold1() { ; CHECK-LABEL: @f_remainder_fold1( ; CHECK-NEXT: ret double 1.000000e+00 @@ -72,7 +72,7 @@ define double @f_remainder_nofold() { ret double %res } -declare double @pow(double, double) +declare double @pow(double, double) #0 define double @f_pow() { ; CHECK-LABEL: @f_pow( ; CHECK-NEXT: ret double 1.000000e+00 @@ -98,3 +98,5 @@ define double @i_powi() { %res = tail call fast double @llvm.powi.f64(double 1.0, i32 2) ret double %res } + +attributes #0 = { nofree nounwind willreturn } _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits