aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SPARC/64abi.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/SPARC/64abi.ll')
-rw-r--r--test/CodeGen/SPARC/64abi.ll16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/64abi.ll b/test/CodeGen/SPARC/64abi.ll
index 5a7eb40..00fb99a 100644
--- a/test/CodeGen/SPARC/64abi.ll
+++ b/test/CodeGen/SPARC/64abi.ll
@@ -376,3 +376,19 @@ define signext i32 @ret_nosext(i32 signext %a0) {
define signext i32 @ret_nozext(i32 signext %a0) {
ret i32 %a0
}
+
+; CHECK-LABEL: test_register_directive
+; CHECK: .register %g2, #scratch
+; CHECK: .register %g3, #scratch
+; CHECK: .register %g6, #ignore
+; CHECK: .register %g7, #ignore
+; CHECK: add %i0, 2, %g2
+; CHECK: add %i0, 3, %g3
+define i32 @test_register_directive(i32 %i0) {
+entry:
+ %0 = add nsw i32 %i0, 2
+ %1 = add nsw i32 %i0, 3
+ tail call void asm sideeffect "", "r,r,~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6},~{o7},~{g1},~{g4},~{g5},~{g6},~{g7}"(i32 %0, i32 %1)
+ %2 = add nsw i32 %0, %1
+ ret i32 %2
+}