diff options
author | Dan Gohman <gohman@apple.com> | 2009-06-04 22:49:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-06-04 22:49:04 +0000 |
commit | 7ce405e7aa026ef683da9eb8cc39cce87fcfa1d6 (patch) | |
tree | 768333097a76cc105813c7c636daf6259e6a0fc7 /test/ExecutionEngine | |
parent | 66bd777e9009fd6a606532f9ed96745e86f3937c (diff) | |
download | external_llvm-7ce405e7aa026ef683da9eb8cc39cce87fcfa1d6.tar.gz external_llvm-7ce405e7aa026ef683da9eb8cc39cce87fcfa1d6.tar.bz2 external_llvm-7ce405e7aa026ef683da9eb8cc39cce87fcfa1d6.zip |
Split the Add, Sub, and Mul instruction opcodes into separate
integer and floating-point opcodes, introducing
FAdd, FSub, and FMul.
For now, the AsmParser, BitcodeReader, and IRBuilder all preserve
backwards compatability, and the Core LLVM APIs preserve backwards
compatibility for IR producers. Most front-ends won't need to change
immediately.
This implements the first step of the plan outlined here:
http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine')
-rw-r--r-- | test/ExecutionEngine/2003-01-10-FUCOM.ll | 6 | ||||
-rw-r--r-- | test/ExecutionEngine/test-fp.ll | 8 | ||||
-rw-r--r-- | test/ExecutionEngine/test-setcond-fp.ll | 8 |
3 files changed, 11 insertions, 11 deletions
diff --git a/test/ExecutionEngine/2003-01-10-FUCOM.ll b/test/ExecutionEngine/2003-01-10-FUCOM.ll index 628be16e31..30f93309d5 100644 --- a/test/ExecutionEngine/2003-01-10-FUCOM.ll +++ b/test/ExecutionEngine/2003-01-10-FUCOM.ll @@ -2,10 +2,10 @@ ; RUN: lli %t.bc > /dev/null define i32 @main() { - %X = add double 0.000000e+00, 1.000000e+00 ; <double> [#uses=1] - %Y = sub double 0.000000e+00, 1.000000e+00 ; <double> [#uses=2] + %X = fadd double 0.000000e+00, 1.000000e+00 ; <double> [#uses=1] + %Y = fsub double 0.000000e+00, 1.000000e+00 ; <double> [#uses=2] %Z = fcmp oeq double %X, %Y ; <i1> [#uses=0] - add double %Y, 0.000000e+00 ; <double>:1 [#uses=0] + fadd double %Y, 0.000000e+00 ; <double>:1 [#uses=0] ret i32 0 } diff --git a/test/ExecutionEngine/test-fp.ll b/test/ExecutionEngine/test-fp.ll index a119b40c34..2e8ecd5a74 100644 --- a/test/ExecutionEngine/test-fp.ll +++ b/test/ExecutionEngine/test-fp.ll @@ -3,13 +3,13 @@ define double @test(double* %DP, double %Arg) { %D = load double* %DP ; <double> [#uses=1] - %V = add double %D, 1.000000e+00 ; <double> [#uses=2] - %W = sub double %V, %V ; <double> [#uses=3] - %X = mul double %W, %W ; <double> [#uses=2] + %V = fadd double %D, 1.000000e+00 ; <double> [#uses=2] + %W = fsub double %V, %V ; <double> [#uses=3] + %X = fmul double %W, %W ; <double> [#uses=2] %Y = fdiv double %X, %X ; <double> [#uses=2] %Z = frem double %Y, %Y ; <double> [#uses=3] %Z1 = fdiv double %Z, %W ; <double> [#uses=0] - %Q = add double %Z, %Arg ; <double> [#uses=1] + %Q = fadd double %Z, %Arg ; <double> [#uses=1] %R = bitcast double %Q to double ; <double> [#uses=1] store double %R, double* %DP ret double %Z diff --git a/test/ExecutionEngine/test-setcond-fp.ll b/test/ExecutionEngine/test-setcond-fp.ll index 235c4027b9..b917693abd 100644 --- a/test/ExecutionEngine/test-setcond-fp.ll +++ b/test/ExecutionEngine/test-setcond-fp.ll @@ -3,10 +3,10 @@ define i32 @main() { - %double1 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=6] - %double2 = add double 0.000000e+00, 0.000000e+00 ; <double> [#uses=6] - %float1 = add float 0.000000e+00, 0.000000e+00 ; <float> [#uses=6] - %float2 = add float 0.000000e+00, 0.000000e+00 ; <float> [#uses=6] + %double1 = fadd double 0.000000e+00, 0.000000e+00 ; <double> [#uses=6] + %double2 = fadd double 0.000000e+00, 0.000000e+00 ; <double> [#uses=6] + %float1 = fadd float 0.000000e+00, 0.000000e+00 ; <float> [#uses=6] + %float2 = fadd float 0.000000e+00, 0.000000e+00 ; <float> [#uses=6] %test49 = fcmp oeq float %float1, %float2 ; <i1> [#uses=0] %test50 = fcmp oge float %float1, %float2 ; <i1> [#uses=0] %test51 = fcmp ogt float %float1, %float2 ; <i1> [#uses=0] |