diff options
| author | Chris Dewhurst <chris.dewhurst@lero.ie> | 2016-09-09 14:16:51 +0000 |
|---|---|---|
| committer | Chris Dewhurst <chris.dewhurst@lero.ie> | 2016-09-09 14:16:51 +0000 |
| commit | c59f7c745bc629d8a6ef22aa0c748e9216452851 (patch) | |
| tree | 797f485f48495a838a771211f342574e45229468 /llvm/test | |
| parent | 6368525eeaa4c0c3c5bbbe199f1afe997fb5d838 (diff) | |
| download | bcm5719-llvm-c59f7c745bc629d8a6ef22aa0c748e9216452851.tar.gz bcm5719-llvm-c59f7c745bc629d8a6ef22aa0c748e9216452851.zip | |
[Sparc][LEON] Removed the parts of the errata fixes implemented using inline assembly as this is not the desired behaviour for end-users. Small change to a unit test to implement this without requiring the inline assembly.
llvm-svn: 281047
Diffstat (limited to 'llvm/test')
| -rwxr-xr-x | llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll | 31 | ||||
| -rwxr-xr-x | llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll | 22 | ||||
| -rwxr-xr-x | llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll | 24 |
3 files changed, 9 insertions, 68 deletions
diff --git a/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll b/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll deleted file mode 100755 index e2f2323a049..00000000000 --- a/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll +++ /dev/null @@ -1,31 +0,0 @@ -; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
-
-; CHECK-LABEL: test_fix_fsmuld_1
-; CHECK: fstod %f20, %f2
-; CHECK: fstod %f21, %f3
-; CHECK: fmuld %f2, %f3, %f8
-; CHECK: fstod %f20, %f0
-define double @test_fix_fsmuld_1() {
-entry:
- %a = alloca float, align 4
- %b = alloca float, align 4
- store float 0x402ECCCCC0000000, float* %a, align 4
- store float 0x4022333340000000, float* %b, align 4
- %0 = load float, float* %b, align 4
- %1 = load float, float* %a, align 4
- %mul = tail call double asm sideeffect "fsmuld $0, $1, $2", "={f20},{f21},{f8}"(float* %a, float* %b)
-
- ret double %mul
-}
-
-; CHECK-LABEL: test_fix_fsmuld_2
-; CHECK: fstod %f20, %f2
-; CHECK: fstod %f21, %f3
-; CHECK: fmuld %f2, %f3, %f8
-; CHECK: fstod %f20, %f0
-define double @test_fix_fsmuld_2(float* %a, float* %b) {
-entry:
- %mul = tail call double asm sideeffect "fsmuld $0, $1, $2", "={f20},{f21},{f8}"(float* %a, float* %b)
-
- ret double %mul
-}
diff --git a/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll b/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll index 57ae16227e7..9b4ceb7ea6a 100755 --- a/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll +++ b/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll @@ -19,25 +19,3 @@ define i32 @ld_i32_test(i32 *%p) { %res = load i32, i32* %p ret i32 %res } - -; CHECK-LABEL: ld_inlineasm_test_1 -; CHECK: ld [%o0], %o0 -; CHECK-NEXT: !NO_APP -; CHECK-NEXT: nop -define float @ld_inlineasm_test_1(float* %a) { -entry: - %res = tail call float asm sideeffect "ld [$1], $0", "=r,r"(float* %a) - - ret float %res -} - -; CHECK-LABEL: ld_inlineasm_test_2 -; CHECK: ld [%o0], %o0 -; CHECK-NEXT: !NO_APP -; CHECK-NEXT: nop -define i32 @ld_inlineasm_test_2(i32* %a) { -entry: - %res = tail call i32 asm sideeffect "ld [$1], $0", "=r,r"(i32* %a) - - ret i32 %res -}
\ No newline at end of file diff --git a/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll b/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll index 7d0950cb1c8..e9ea7c6c999 100755 --- a/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll +++ b/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll @@ -1,19 +1,13 @@ -; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
+; RUN: llc %s -O0 -march=sparc -mattr=replacefmuls -o - | FileCheck %s
-; CHECK-LABEL: fmuls_fix_test
-; CHECK: fstod %f20, %f2
-; CHECK: fstod %f21, %f3
-; CHECK: fmuld %f2, %f3, %f8
-; CHECK: fstod %f20, %f0
-define double @fmuls_fix_test() {
+; CHECK-LABEL: test_replace_fmuls
+; CHECK: fsmuld %f1, %f0, %f2
+; CHECK: fdtos %f2, %f0
+; NOFIX-LABEL: test_replace_fmuls
+; NOFIX: fmuls %f1, %f0, %f0
+define float @test_replace_fmuls(float %a, float %b) {
entry:
- %a = alloca float, align 4
- %b = alloca float, align 4
- store float 0x402ECCCCC0000000, float* %a, align 4
- store float 0x4022333340000000, float* %b, align 4
- %0 = load float, float* %b, align 4
- %1 = load float, float* %a, align 4
- %mul = tail call double asm sideeffect "fmuls $0, $1, $2", "={f20},{f21},{f8}"(float* %a, float* %b)
+ %mul = fmul float %a, %b
- ret double %mul
+ ret float %mul
}
|

