diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2011-01-11 01:07:20 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2011-01-11 01:07:20 +0000 |
commit | f7b0047f5f4d3525486d8fc139f05bddc4265d01 (patch) | |
tree | 6a6063462a75f0421e10aca0a45f0b27cf125433 /test/Transforms/ConstProp | |
parent | da1c122da5e1a86c8c2bf20e47a43f5c8fefc4e2 (diff) | |
download | external_llvm-f7b0047f5f4d3525486d8fc139f05bddc4265d01.zip external_llvm-f7b0047f5f4d3525486d8fc139f05bddc4265d01.tar.gz external_llvm-f7b0047f5f4d3525486d8fc139f05bddc4265d01.tar.bz2 |
FileCheck-ize a test, and move a no-longer calling test case to another
file and make it actually test something...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp')
-rw-r--r-- | test/Transforms/ConstProp/basictest.ll | 9 | ||||
-rw-r--r-- | test/Transforms/ConstProp/calls.ll | 31 |
2 files changed, 21 insertions, 19 deletions
diff --git a/test/Transforms/ConstProp/basictest.ll b/test/Transforms/ConstProp/basictest.ll index 14580c1..df57fb6 100644 --- a/test/Transforms/ConstProp/basictest.ll +++ b/test/Transforms/ConstProp/basictest.ll @@ -31,3 +31,12 @@ bb: ; CHECK: @test2 ; CHECK: ret i1 true } + +define i1 @TNAN() { +; CHECK: @TNAN +; CHECK: ret i1 true + %A = fcmp uno double 0x7FF8000000000000, 1.000000e+00 + %B = fcmp uno double 1.230000e+02, 1.000000e+00 + %C = or i1 %A, %B + ret i1 %C +} diff --git a/test/Transforms/ConstProp/calls.ll b/test/Transforms/ConstProp/calls.ll index 3c266fe..a12fc82 100644 --- a/test/Transforms/ConstProp/calls.ll +++ b/test/Transforms/ConstProp/calls.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -constprop -S | not grep call +; RUN: opt < %s -constprop -S | FileCheck %s declare double @cos(double) @@ -8,23 +8,16 @@ declare double @tan(double) declare double @sqrt(double) -declare i1 @llvm.isunordered.f64(double, double) - define double @T() { - %A = call double @cos( double 0.000000e+00 ) ; <double> [#uses=1] - %B = call double @sin( double 0.000000e+00 ) ; <double> [#uses=1] - %a = fadd double %A, %B ; <double> [#uses=1] - %C = call double @tan( double 0.000000e+00 ) ; <double> [#uses=1] - %b = fadd double %a, %C ; <double> [#uses=1] - %D = call double @sqrt( double 4.000000e+00 ) ; <double> [#uses=1] - %c = fadd double %b, %D ; <double> [#uses=1] - ret double %c -} - -define i1 @TNAN() { - %A = fcmp uno double 0x7FF8000000000000, 1.000000e+00 ; <i1> [#uses=1] - %B = fcmp uno double 1.230000e+02, 1.000000e+00 ; <i1> [#uses=1] - %C = or i1 %A, %B ; <i1> [#uses=1] - ret i1 %C +; CHECK: @T +; CHECK-NOT: call +; CHECK: ret + %A = call double @cos(double 0.000000e+00) + %B = call double @sin(double 0.000000e+00) + %a = fadd double %A, %B + %C = call double @tan(double 0.000000e+00) + %b = fadd double %a, %C + %D = call double @sqrt(double 4.000000e+00) + %c = fadd double %b, %D + ret double %c } - |