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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=sparcv9 | FileCheck %s -check-prefix=V9
; RUN: llc < %s -mtriple=sparcv9 -mattr=vis3 | FileCheck %s -check-prefix=VIS3
define i32 @stow(float %float) nounwind {
; V9-LABEL: stow:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %f1, [%sp+2187]
; V9-NEXT: ld [%sp+2187], %o0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: stow:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movstouw %f1, %o0
%w = bitcast float %float to i32
ret i32 %w
}
define zeroext i32 @stouw(float %float) nounwind {
; V9-LABEL: stouw:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %f1, [%sp+2187]
; V9-NEXT: ld [%sp+2187], %o0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: stouw:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movstouw %f1, %o0
%uw = bitcast float %float to i32
ret i32 %uw
}
define signext i32 @stosw(float %float) nounwind {
; V9-LABEL: stosw:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %f1, [%sp+2187]
; V9-NEXT: ldsw [%sp+2187], %o0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: stosw:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movstosw %f1, %o0
%sw = bitcast float %float to i32
ret i32 %sw
}
define float @wtos(i32 %w) nounwind {
; V9-LABEL: wtos:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %o0, [%sp+2187]
; V9-NEXT: ld [%sp+2187], %f0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: wtos:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movwtos %o0, %f0
%float = bitcast i32 %w to float
ret float %float
}
define float @uwtos(i32 zeroext %uw) nounwind {
; V9-LABEL: uwtos:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %o0, [%sp+2187]
; V9-NEXT: ld [%sp+2187], %f0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: uwtos:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movwtos %o0, %f0
%float = bitcast i32 %uw to float
ret float %float
}
define float @swtos(i32 signext %sw) nounwind {
; V9-LABEL: swtos:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: st %o0, [%sp+2187]
; V9-NEXT: ld [%sp+2187], %f0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: swtos:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movwtos %o0, %f0
%float = bitcast i32 %sw to float
ret float %float
}
define i64 @dtox(double %double) nounwind {
; V9-LABEL: dtox:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: std %f0, [%sp+2183]
; V9-NEXT: ldx [%sp+2183], %o0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: dtox:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movdtox %f0, %o0
%x = bitcast double %double to i64
ret i64 %x
}
define double @xtod(i64 %x) nounwind {
; V9-LABEL: xtod:
; V9: ! %bb.0:
; V9-NEXT: add %sp, -144, %sp
; V9-NEXT: stx %o0, [%sp+2183]
; V9-NEXT: ldd [%sp+2183], %f0
; V9-NEXT: retl
; V9-NEXT: add %sp, 144, %sp
;
; VIS3-LABEL: xtod:
; VIS3: ! %bb.0:
; VIS3-NEXT: retl
; VIS3-NEXT: movxtod %o0, %f0
%double = bitcast i64 %x to double
ret double %double
}
|