summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2016-08-12 14:48:09 +0000
committerJames Y Knight <jyknight@google.com>2016-08-12 14:48:09 +0000
commit2cc9da9a654ca1f9f90d1eaaea889516074f975f (patch)
treeb322c45c79fc2e10d8aa6eb750b2ecc23ee71db1 /llvm/test
parent3785393def95f2b52ef28e9bcb3985066812d2db (diff)
downloadbcm5719-llvm-2cc9da9a654ca1f9f90d1eaaea889516074f975f.tar.gz
bcm5719-llvm-2cc9da9a654ca1f9f90d1eaaea889516074f975f.zip
Revert "[Sparc] Leon errata fix passes."
...and the two followup commits: Revert "[Sparc][Leon] Missed resetting option flags from check-in 278489." Revert "[Sparc][Leon] Errata fixes for various errata in different versions of the Leon variants of the Sparc 32 bit processor." This reverts commit r274856, r278489, and r278492. llvm-svn: 278511
Diffstat (limited to 'llvm/test')
-rwxr-xr-xllvm/test/CodeGen/SPARC/LeonFillDataCachePassUT.ll27
-rwxr-xr-xllvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll36
-rw-r--r--llvm/test/CodeGen/SPARC/LeonInsertNOPLoad.ll13
-rwxr-xr-xllvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll22
-rw-r--r--llvm/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll17
-rw-r--r--llvm/test/CodeGen/SPARC/LeonPreventRoundChangePassUT.ll65
-rwxr-xr-xllvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll24
-rw-r--r--llvm/test/CodeGen/SPARC/LeonReplaceSDIVPassUT.ll9
8 files changed, 62 insertions, 151 deletions
diff --git a/llvm/test/CodeGen/SPARC/LeonFillDataCachePassUT.ll b/llvm/test/CodeGen/SPARC/LeonFillDataCachePassUT.ll
deleted file mode 100755
index 5461642110d..00000000000
--- a/llvm/test/CodeGen/SPARC/LeonFillDataCachePassUT.ll
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=leon2 -mattr=+filldatacache -o - | FileCheck %s
-; RUN: llc %s -O0 -march=sparc -mcpu=at697e -o - | FileCheck %s
-; RUN: llc %s -O0 -march=sparc -mcpu=at697f -mattr=+filldatacache -o - | FileCheck %s
-
-; CHECK-LABEL: test_filldatacache_1
-; CHECK: or %g0, 1, %g1
-; CHECK: nop
-; CHECK-NEXT: add %g1, 1, %g1
-; CHECK-NEXT: cmp %g1, 4096
-; CHECK-NEXT: ble {{.+}}
-define zeroext i1@test_filldatacache_1(i1 zeroext %a, i1 zeroext %b) {
- %1 = tail call zeroext i1 asm sideeffect "udivcc $0, $1, $2", "=r,r,r"(i1 zeroext %a, i1 zeroext %b)
-
- ret i1 %1
-}
-
-
-; CHECK-LABEL: test_filldatacache_2
-; CHECK-NOT: or %g0, 1, %g1
-; CHECK-NOT: add %g1, 1, %g1
-; CHECK-NOT: cmp %g1, 4096
-; CHECK-NOT: ble {{.+}}
-define zeroext i1@test_filldatacache_2(i1 zeroext %a, i1 zeroext %b) {
- %1 = tail call zeroext i1 asm sideeffect "sdivcc $0, $1, $2", "=r,r,r"(i1 zeroext %a, i1 zeroext %b)
-
- ret i1 %1
-}
diff --git a/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll b/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll
index a9fae8e50fc..e2f2323a049 100755
--- a/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll
+++ b/llvm/test/CodeGen/SPARC/LeonFixFSMULDPassUT.ll
@@ -1,17 +1,31 @@
-; RUN: llc %s -O0 -march=sparc -mattr=fixfsmuld -o - | FileCheck %s
-; RUN: llc %s -O0 -march=sparc -o - | FileCheck %s --check-prefix=NOFIX
+; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
; CHECK-LABEL: test_fix_fsmuld_1
-; CHECK: fstod %f1, %f2
-; CHECK: fstod %f0, %f4
-; CHECK: fmuld %f2, %f4, %f0
-; NOFIX-LABEL: test_fix_fsmuld_1
-; NOFIX: fsmuld %f1, %f0, %f0
-define double @test_fix_fsmuld_1(float %a, float %b) {
+; CHECK: fstod %f20, %f2
+; CHECK: fstod %f21, %f3
+; CHECK: fmuld %f2, %f3, %f8
+; CHECK: fstod %f20, %f0
+define double @test_fix_fsmuld_1() {
entry:
- %0 = fpext float %a to double
- %1 = fpext float %b to double
- %mul = fmul double %0, %1
+ %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/LeonInsertNOPLoad.ll b/llvm/test/CodeGen/SPARC/LeonInsertNOPLoad.ll
deleted file mode 100644
index 315fc85fca3..00000000000
--- a/llvm/test/CodeGen/SPARC/LeonInsertNOPLoad.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
-
-; CHECK: ld [%o0+%lo(.LCPI0_0)], %f0
-; CHECK-NEXT: nop
-
-
-define float @X() #0 {
-entry:
- %f = alloca float, align 4
- store float 0x3FF3C08320000000, float* %f, align 4
- %0 = load float, float* %f, align 4
- ret float %0
-}
diff --git a/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll b/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll
index 9b4ceb7ea6a..57ae16227e7 100755
--- a/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll
+++ b/llvm/test/CodeGen/SPARC/LeonInsertNOPLoadPassUT.ll
@@ -19,3 +19,25 @@ 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/LeonInsertNOPsDoublePrecision.ll b/llvm/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
deleted file mode 100644
index 0ee3d9071a9..00000000000
--- a/llvm/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=at697f -o - | FileCheck %s
-
-; CHECK: ldd
-; CHECK: ldd
-; CHECK-NEXT: nop
-
-define double @mult() #0 {
-entry:
- %x = alloca double, align 8
- %y = alloca double, align 8
- store double 3.141590e+00, double* %x, align 8
- store double 1.234560e+00, double* %y, align 8
- %0 = load double, double* %x, align 8
- %1 = load double, double* %y, align 8
- %mul = fmul double %0, %1
- ret double %mul
-}
diff --git a/llvm/test/CodeGen/SPARC/LeonPreventRoundChangePassUT.ll b/llvm/test/CodeGen/SPARC/LeonPreventRoundChangePassUT.ll
deleted file mode 100644
index 07172fdb945..00000000000
--- a/llvm/test/CodeGen/SPARC/LeonPreventRoundChangePassUT.ll
+++ /dev/null
@@ -1,65 +0,0 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s -check-prefix=NO_ROUND_FUNC
-; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -mattr=+prvntroundchange -o - | FileCheck %s -check-prefix=NO_ROUND_FUNC
-
-; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -mattr=-prvntroundchange -o - | FileCheck %s -check-prefix=ROUND_FUNC
-; RUN: llc %s -O0 -march=sparc -mcpu=leon3 -o - | FileCheck %s -check-prefix=ROUND_FUNC
-
-
-; NO_ROUND_FUNC-LABEL: test_round_change
-; NO_ROUND_FUNC-NOT: fesetround
-
-; ROUND_FUNC-LABEL: test_round_change
-; ROUND_FUNC: fesetround
-
-; ModuleID = '<stdin>'
-target datalayout = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"
-target triple = "sparc-unknown--eabi"
-
-@.str = private unnamed_addr constant [17 x i8] c"-((-a)*b) != a*b\00", align 1
-@.str.1 = private unnamed_addr constant [7 x i8] c"test.c\00", align 1
-@__PRETTY_FUNCTION__.mult = private unnamed_addr constant [12 x i8] c"void mult()\00", align 1
-
-; Function Attrs: nounwind
-define void @test_round_change() #0 {
-entry:
- %a = alloca double, align 8
- %b = alloca double, align 8
- %x = alloca float, align 4
- store double 1.100000e+00, double* %a, align 8
- store double 1.010000e+01, double* %b, align 8
- store float 0x400921FA00000000, float* %x, align 4
- %call = call i32 @fesetround(i32 2048) #2
- %0 = load double, double* %a, align 8
- %sub = fsub double -0.000000e+00, %0
- %1 = load double, double* %b, align 8
- %mul = fmul double %sub, %1
- %sub1 = fsub double -0.000000e+00, %mul
- %2 = load double, double* %a, align 8
- %3 = load double, double* %b, align 8
- %mul2 = fmul double %2, %3
- %cmp = fcmp une double %sub1, %mul2
- br i1 %cmp, label %cond.true, label %cond.false
-
-cond.true: ; preds = %entry
- br label %cond.end
-
-cond.false: ; preds = %entry
- call void @__assert_fail(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i32 0, i32 0), i32 10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__PRETTY_FUNCTION__.mult, i32 0, i32 0)) #3
- unreachable
- ; No predecessors!
- br label %cond.end
-
-cond.end: ; preds = %4, %cond.true
- ret void
-}
-
-; Function Attrs: nounwind
-declare i32 @fesetround(i32) #0
-
-; Function Attrs: noreturn nounwind
-declare void @__assert_fail(i8*, i8*, i32, i8*) #1
-
-attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #1 = { noreturn nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
-attributes #2 = { nounwind }
-attributes #3 = { noreturn nounwind } \ No newline at end of file
diff --git a/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll b/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll
index e9ea7c6c999..7d0950cb1c8 100755
--- a/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll
+++ b/llvm/test/CodeGen/SPARC/LeonReplaceFMULSPassUT.ll
@@ -1,13 +1,19 @@
-; RUN: llc %s -O0 -march=sparc -mattr=replacefmuls -o - | FileCheck %s
+; RUN: llc %s -O0 -march=sparc -mcpu=ut699 -o - | FileCheck %s
-; 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) {
+; 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() {
entry:
- %mul = fmul float %a, %b
+ %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)
- ret float %mul
+ ret double %mul
}
diff --git a/llvm/test/CodeGen/SPARC/LeonReplaceSDIVPassUT.ll b/llvm/test/CodeGen/SPARC/LeonReplaceSDIVPassUT.ll
deleted file mode 100644
index 67232d77703..00000000000
--- a/llvm/test/CodeGen/SPARC/LeonReplaceSDIVPassUT.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: llc %s -O0 -march=sparc -mcpu=at697e -o - | FileCheck %s
-
-; CHECK: sdivcc %o0, %o1, %o0
-
-define i32 @lbr59(i32 %a, i32 %b)
-{
- %r = sdiv i32 %a, %b
- ret i32 %r
-}
OpenPOWER on IntegriCloud