aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-01-21 21:02:27 +0000
committerBill Wendling <isanbard@gmail.com>2009-01-21 21:02:27 +0000
commite3b014a05f5587dfee7194c23d8be6ddb3160315 (patch)
tree284f0bab8206df7c85008d06f320c00b25ec1513 /test/CodeGen
parent9ad136c851e0a66eb471573aac9fec47d53a61ba (diff)
downloadexternal_llvm-e3b014a05f5587dfee7194c23d8be6ddb3160315.zip
external_llvm-e3b014a05f5587dfee7194c23d8be6ddb3160315.tar.gz
external_llvm-e3b014a05f5587dfee7194c23d8be6ddb3160315.tar.bz2
Run this through -simplifycfg and -mem2reg to test only what we need to test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/limited-prec.ll103
1 files changed, 13 insertions, 90 deletions
diff --git a/test/CodeGen/X86/limited-prec.ll b/test/CodeGen/X86/limited-prec.ll
index 7b3088a..ef9ddb7 100644
--- a/test/CodeGen/X86/limited-prec.ll
+++ b/test/CodeGen/X86/limited-prec.ll
@@ -1,133 +1,56 @@
-; RUN: llvm-as < %s | llc -limit-float-precision=6 -march=x86 | \
-; RUN: not grep exp | not grep log | not grep pow
-; RUN: llvm-as < %s | llc -limit-float-precision=12 -march=x86 | \
-; RUN: not grep exp | not grep log | not grep pow
-; RUN: llvm-as < %s | llc -limit-float-precision=18 -march=x86 | \
-; RUN: not grep exp | not grep log | not grep pow
+; ModuleID = '<stdin>'
target triple = "i386-apple-darwin9.5"
define float @f1(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.exp.f32(float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.exp.f32(float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.exp.f32(float) nounwind readonly
define float @f2(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.exp2.f32(float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.exp2.f32(float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.exp2.f32(float) nounwind readonly
define float @f3(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.pow.f32(float 1.000000e+01, float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.pow.f32(float 1.000000e+01, float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.pow.f32(float, float) nounwind readonly
define float @f4(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.log.f32(float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.log.f32(float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.log.f32(float) nounwind readonly
define float @f5(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.log2.f32(float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.log2.f32(float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.log2.f32(float) nounwind readonly
define float @f6(float %x) nounwind noinline {
entry:
- %x_addr = alloca float ; <float*> [#uses=2]
- %retval = alloca float ; <float*> [#uses=2]
- %0 = alloca float ; <float*> [#uses=2]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- store float %x, float* %x_addr
- %1 = load float* %x_addr, align 4 ; <float> [#uses=1]
- %2 = call float @llvm.log10.f32(float %1) ; <float> [#uses=1]
- store float %2, float* %0, align 4
- %3 = load float* %0, align 4 ; <float> [#uses=1]
- store float %3, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; <float> [#uses=1]
- ret float %retval1
+ %0 = call float @llvm.log10.f32(float %x) ; <float> [#uses=1]
+ ret float %0
}
declare float @llvm.log10.f32(float) nounwind readonly