aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SPARC
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
committerStephen Hines <srhines@google.com>2014-05-29 02:49:00 -0700
commitdce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch)
treedcebc53f2b182f145a2e659393bf9a0472cedf23 /test/CodeGen/SPARC
parent220b921aed042f9e520c26cffd8282a94c66c3d5 (diff)
downloadexternal_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz
external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/CodeGen/SPARC')
-rw-r--r--test/CodeGen/SPARC/2011-01-11-FrameAddr.ll6
-rw-r--r--test/CodeGen/SPARC/2011-01-19-DelaySlot.ll3
-rw-r--r--test/CodeGen/SPARC/64abi.ll4
-rw-r--r--test/CodeGen/SPARC/64bit.ll12
-rw-r--r--test/CodeGen/SPARC/64cond.ll6
-rw-r--r--test/CodeGen/SPARC/atomics.ll6
-rw-r--r--test/CodeGen/SPARC/exception.ll34
-rw-r--r--test/CodeGen/SPARC/leafproc.ll6
-rw-r--r--test/CodeGen/SPARC/parts.ll6
-rw-r--r--test/CodeGen/SPARC/sret-secondary.ll8
10 files changed, 33 insertions, 58 deletions
diff --git a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
index 050b76d..1c8e7d8 100644
--- a/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
+++ b/test/CodeGen/SPARC/2011-01-11-FrameAddr.ll
@@ -60,13 +60,13 @@ declare i8* @llvm.frameaddress(i32) nounwind readnone
define i8* @retaddr() nounwind readnone {
entry:
;V8-LABEL: retaddr:
-;V8: or %g0, %o7, {{.+}}
+;V8: mov %o7, {{.+}}
;V9-LABEL: retaddr:
-;V9: or %g0, %o7, {{.+}}
+;V9: mov %o7, {{.+}}
;SPARC64-LABEL: retaddr
-;SPARC64: or %g0, %o7, {{.+}}
+;SPARC64: mov %o7, {{.+}}
%0 = tail call i8* @llvm.returnaddress(i32 0)
ret i8* %0
diff --git a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
index 60bdf06..8a3edc6 100644
--- a/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
+++ b/test/CodeGen/SPARC/2011-01-19-DelaySlot.ll
@@ -1,6 +1,7 @@
;RUN: llc -march=sparc < %s -verify-machineinstrs | FileCheck %s
;RUN: llc -march=sparc -O0 < %s -verify-machineinstrs | FileCheck %s -check-prefix=UNOPT
+target triple = "sparc-unknown-linux-gnu"
define i32 @test(i32 %a) nounwind {
entry:
@@ -59,7 +60,7 @@ entry:
;CHECK: !NO_APP
;CHECK-NEXT: cmp
;CHECK-NEXT: bg
-;CHECK-NEXT: or
+;CHECK-NEXT: mov
tail call void asm sideeffect "sethi 0, %g0", ""() nounwind
%0 = icmp slt i32 %a, 0
br i1 %0, label %bb, label %bb1
diff --git a/test/CodeGen/SPARC/64abi.ll b/test/CodeGen/SPARC/64abi.ll
index 3771888..a88e19a5 100644
--- a/test/CodeGen/SPARC/64abi.ll
+++ b/test/CodeGen/SPARC/64abi.ll
@@ -44,7 +44,7 @@ define void @intarg(i8 %a0, ; %i0
; CHECK: sra %i0, 0, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%sp+2223]
; Use %o0-%o5 for outgoing arguments
-; CHECK: or %g0, 5, %o5
+; CHECK: mov 5, %o5
; CHECK: call intarg
; CHECK-NOT: add %sp
; CHECK: restore
@@ -208,7 +208,7 @@ define i32 @inreg_if(float inreg %a0, ; %f0
; CHECK: call_inreg_if
; CHECK: fmovs %f3, %f0
-; CHECK: or %g0, %i2, %o0
+; CHECK: mov %i2, %o0
; CHECK: call inreg_if
define void @call_inreg_if(i32* %p, float %f3, i32 %i2) {
%x = call i32 @inreg_if(float %f3, i32 %i2)
diff --git a/test/CodeGen/SPARC/64bit.ll b/test/CodeGen/SPARC/64bit.ll
index 7ab19f3..b18f1bc 100644
--- a/test/CodeGen/SPARC/64bit.ll
+++ b/test/CodeGen/SPARC/64bit.ll
@@ -2,11 +2,11 @@
; RUN: llc < %s -march=sparcv9 -mattr=+popc | FileCheck %s -check-prefix=OPT
; CHECK-LABEL: ret2:
-; CHECK: or %g0, %i1, %i0
+; CHECK: mov %i1, %i0
; OPT-LABEL: ret2:
; OPT: retl
-; OPT: or %g0, %o1, %o0
+; OPT: mov %o1, %o0
define i64 @ret2(i64 %a, i64 %b) {
ret i64 %b
}
@@ -39,21 +39,21 @@ define i64 @sra_reg(i64 %a, i64 %b) {
; restore %g0, %g0, %o0
;
; CHECK: ret_imm0
-; CHECK: or %g0, 0, %i0
+; CHECK: mov 0, %i0
; OPT: ret_imm0
; OPT: retl
-; OPT: or %g0, 0, %o0
+; OPT: mov 0, %o0
define i64 @ret_imm0() {
ret i64 0
}
; CHECK: ret_simm13
-; CHECK: or %g0, -4096, %i0
+; CHECK: mov -4096, %i0
; OPT: ret_simm13
; OPT: retl
-; OPT: or %g0, -4096, %o0
+; OPT: mov -4096, %o0
define i64 @ret_simm13() {
ret i64 -4096
}
diff --git a/test/CodeGen/SPARC/64cond.ll b/test/CodeGen/SPARC/64cond.ll
index 1bd17a4..e491d61 100644
--- a/test/CodeGen/SPARC/64cond.ll
+++ b/test/CodeGen/SPARC/64cond.ll
@@ -112,9 +112,9 @@ entry:
; CHECK-LABEL: setcc_resultty
; CHECK-DAG: srax %i0, 63, %o0
-; CHECK-DAG: or %g0, %i0, %o1
-; CHECK-DAG: or %g0, 0, %o2
-; CHECK-DAG: or %g0, 32, %o3
+; CHECK-DAG: mov %i0, %o1
+; CHECK-DAG: mov 0, %o2
+; CHECK-DAG: mov 32, %o3
; CHECK-DAG: call __multi3
; CHECK: cmp
; CHECK: movne %xcc, 1, [[R:%[gilo][0-7]]]
diff --git a/test/CodeGen/SPARC/atomics.ll b/test/CodeGen/SPARC/atomics.ll
index 4e3e7ae..5e41300 100644
--- a/test/CodeGen/SPARC/atomics.ll
+++ b/test/CodeGen/SPARC/atomics.ll
@@ -33,7 +33,7 @@ entry:
}
; CHECK-LABEL: test_cmpxchg_i32
-; CHECK: or %g0, 123, [[R:%[gilo][0-7]]]
+; CHECK: mov 123, [[R:%[gilo][0-7]]]
; CHECK: cas [%o1], %o0, [[R]]
define i32 @test_cmpxchg_i32(i32 %a, i32* %ptr) {
@@ -43,7 +43,7 @@ entry:
}
; CHECK-LABEL: test_cmpxchg_i64
-; CHECK: or %g0, 123, [[R:%[gilo][0-7]]]
+; CHECK: mov 123, [[R:%[gilo][0-7]]]
; CHECK: casx [%o1], %o0, [[R]]
define i64 @test_cmpxchg_i64(i64 %a, i64* %ptr) {
@@ -53,7 +53,7 @@ entry:
}
; CHECK-LABEL: test_swap_i32
-; CHECK: or %g0, 42, [[R:%[gilo][0-7]]]
+; CHECK: mov 42, [[R:%[gilo][0-7]]]
; CHECK: swap [%o1], [[R]]
define i32 @test_swap_i32(i32 %a, i32* %ptr) {
diff --git a/test/CodeGen/SPARC/exception.ll b/test/CodeGen/SPARC/exception.ll
index 3a3f59f..eca9c8b 100644
--- a/test/CodeGen/SPARC/exception.ll
+++ b/test/CodeGen/SPARC/exception.ll
@@ -1,9 +1,7 @@
; RUN: llc < %s -march=sparc -relocation-model=static | FileCheck -check-prefix=V8ABS %s
; RUN: llc < %s -march=sparc -relocation-model=pic | FileCheck -check-prefix=V8PIC %s
-; RUN: llc < %s -march=sparc -relocation-model=pic -disable-cfi | FileCheck -check-prefix=V8PIC_NOCFI %s
; RUN: llc < %s -march=sparcv9 -relocation-model=static | FileCheck -check-prefix=V9ABS %s
; RUN: llc < %s -march=sparcv9 -relocation-model=pic | FileCheck -check-prefix=V9PIC %s
-; RUN: llc < %s -march=sparcv9 -relocation-model=pic -disable-cfi | FileCheck -check-prefix=V9PIC_NOCFI %s
%struct.__fundamental_type_info_pseudo = type { %struct.__type_info_pseudo }
@@ -47,22 +45,6 @@
; V8PIC: .L_ZTIi.DW.stub:
; V8PIC-NEXT: .word _ZTIi
-; V8PIC_NOCFI-LABEL: main:
-; V8PIC_NOCFI: .section .gcc_except_table
-; V8PIC_NOCFI-NOT: .section
-; V8PIC_NOCFI: .word %r_disp32(.L_ZTIi.DW.stub)
-; V8PIC_NOCFI: .data
-; V8PIC_NOCFI: .L_ZTIi.DW.stub:
-; V8PIC_NOCFI-NEXT: .word _ZTIi
-; V8PIC_NOCFI: .section .eh_frame
-; V8PIC_NOCFI-NOT: .section
-; V8PIC_NOCFI: .byte 15 ! CIE Return Address Column
-; V8PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
-; V8PIC_NOCFI: .byte 12 ! DW_CFA_def_cfa
-; V8PIC_NOCFI: .byte 14 ! Reg 14
-; V8PIC_NOCFI-NEXT: .byte 0 ! Offset 0
-; V8PIC_NOCFI: .word %r_disp32(.Ltmp{{.+}}) ! FDE initial location
-
; V9ABS-LABEL: main:
; V9ABS: .cfi_startproc
@@ -89,22 +71,6 @@
; V9PIC: .L_ZTIi.DW.stub:
; V9PIC-NEXT: .xword _ZTIi
-; V9PIC_NOCFI-LABEL: main:
-; V9PIC_NOCFI: .section .gcc_except_table
-; V9PIC_NOCFI-NOT: .section
-; V9PIC_NOCFI: .word %r_disp32(.L_ZTIi.DW.stub)
-; V9PIC_NOCFI: .data
-; V9PIC_NOCFI: .L_ZTIi.DW.stub:
-; V9PIC_NOCFI-NEXT: .xword _ZTIi
-; V9PIC_NOCFI: .section .eh_frame
-; V9PIC_NOCFI-NOT: .section
-; V9PIC_NOCFI: .byte 15 ! CIE Return Address Column
-; V9PIC_NOCFI: .word %r_disp32(DW.ref.__gxx_personality_v0)
-; V9PIC_NOCFI: .byte 12 ! DW_CFA_def_cfa
-; V9PIC_NOCFI-NEXT: .byte 14 ! Reg 14
-; V9PIC_NOCFI: .ascii "\377\017" ! Offset 2047
-; V9PIC_NOCFI: .word %r_disp32(.Ltmp{{.+}}) ! FDE initial location
-
define i32 @main(i32 %argc, i8** nocapture readnone %argv) unnamed_addr #0 {
entry:
%0 = icmp eq i32 %argc, 2
diff --git a/test/CodeGen/SPARC/leafproc.ll b/test/CodeGen/SPARC/leafproc.ll
index 963fac0..abb8ed9 100644
--- a/test/CodeGen/SPARC/leafproc.ll
+++ b/test/CodeGen/SPARC/leafproc.ll
@@ -11,7 +11,7 @@ entry:
; CHECK-LABEL: return_int_const:
; CHECK: retl
-; CHECK-NEXT: or %g0, 1729, %o0
+; CHECK-NEXT: mov 1729, %o0
define i32 @return_int_const() {
entry:
ret i32 1729
@@ -58,9 +58,9 @@ entry:
; CHECK-LABEL: leaf_proc_with_local_array:
; CHECK: add %sp, -104, %sp
-; CHECK: or %g0, 1, [[R1:%[go][0-7]]]
+; CHECK: mov 1, [[R1:%[go][0-7]]]
; CHECK: st [[R1]], [%sp+96]
-; CHECK: or %g0, 2, [[R2:%[go][0-7]]]
+; CHECK: mov 2, [[R2:%[go][0-7]]]
; CHECK: st [[R2]], [%sp+100]
; CHECK: ld {{.+}}, %o0
; CHECK: retl
diff --git a/test/CodeGen/SPARC/parts.ll b/test/CodeGen/SPARC/parts.ll
index 57add49..47feb15 100644
--- a/test/CodeGen/SPARC/parts.ll
+++ b/test/CodeGen/SPARC/parts.ll
@@ -2,10 +2,10 @@
; CHECK-LABEL: test
; CHECK: srl %i1, 0, %o2
-; CHECK-NEXT: or %g0, %i2, %o0
+; CHECK-NEXT: mov %i2, %o0
; CHECK-NEXT: call __ashlti3
-; CHECK-NEXT: or %g0, %i3, %o1
-; CHECK-NEXT: or %g0, %o0, %i0
+; CHECK-NEXT: mov %i3, %o1
+; CHECK-NEXT: mov %o0, %i0
define i128 @test(i128 %a, i128 %b) {
entry:
diff --git a/test/CodeGen/SPARC/sret-secondary.ll b/test/CodeGen/SPARC/sret-secondary.ll
new file mode 100644
index 0000000..4efcabf
--- /dev/null
+++ b/test/CodeGen/SPARC/sret-secondary.ll
@@ -0,0 +1,8 @@
+; RUN: not llc -march=sparc < %s -o /dev/null 2>&1 | FileCheck %s
+
+; CHECK: sparc only supports sret on the first parameter
+
+define void @foo(i32 %a, i32* sret %out) {
+ store i32 %a, i32* %out
+ ret void
+}