1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
; RUN: llc < %s -march=sparcv9 | FileCheck %s
target datalayout = "E-i64:64-n32:64-S128"
target triple = "sparc64-sun-sparc"
; CHECK-LABEL: test_and_spill
; CHECK: and %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_and_spill(i64 %a, i64 %b) {
entry:
%r0 = and i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_or_spill
; CHECK: or %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_or_spill(i64 %a, i64 %b) {
entry:
%r0 = or i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_xor_spill
; CHECK: xor %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_xor_spill(i64 %a, i64 %b) {
entry:
%r0 = xor i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_add_spill
; CHECK: add %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_add_spill(i64 %a, i64 %b) {
entry:
%r0 = add i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_sub_spill
; CHECK: sub %i0, %i1, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_sub_spill(i64 %a, i64 %b) {
entry:
%r0 = sub i64 %a, %b
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_andi_spill
; CHECK: and %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_andi_spill(i64 %a) {
entry:
%r0 = and i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_ori_spill
; CHECK: or %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_ori_spill(i64 %a) {
entry:
%r0 = or i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_xori_spill
; CHECK: xor %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_xori_spill(i64 %a) {
entry:
%r0 = xor i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_addi_spill
; CHECK: add %i0, 1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_addi_spill(i64 %a) {
entry:
%r0 = add i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
; CHECK-LABEL: test_subi_spill
; CHECK: add %i0, -1729, [[R:%[gilo][0-7]]]
; CHECK: stx [[R]], [%fp+{{.+}}]
; CHECK: ldx [%fp+{{.+}}, %i0
define i64 @test_subi_spill(i64 %a) {
entry:
%r0 = sub i64 %a, 1729
%0 = tail call i64 asm sideeffect "#$0 $1", "=r,r,~{i0},~{i1},~{i2},~{i3},~{i4},~{i5},~{i6},~{i7},~{g1},~{g2},~{g3},~{g4},~{g5},~{g6},~{g7},~{l0},~{l1},~{l2},~{l3},~{l4},~{l5},~{l6},~{l7},~{o0},~{o1},~{o2},~{o3},~{o4},~{o5},~{o6}"(i64 %r0)
ret i64 %r0
}
|