@@ -5,9 +5,8 @@ declare void @use8(i8)
5
5
6
6
define i6 @add_shl_same_amount (i6 %x , i6 %y , i6 %z ) {
7
7
; CHECK-LABEL: @add_shl_same_amount(
8
- ; CHECK-NEXT: [[XS:%.*]] = shl i6 [[X:%.*]], [[Z:%.*]]
9
- ; CHECK-NEXT: [[YS:%.*]] = shl i6 [[Y:%.*]], [[Z]]
10
- ; CHECK-NEXT: [[DIFF:%.*]] = add i6 [[XS]], [[YS]]
8
+ ; CHECK-NEXT: [[TMP1:%.*]] = add i6 [[X:%.*]], [[Y:%.*]]
9
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
11
10
; CHECK-NEXT: ret i6 [[DIFF]]
12
11
;
13
12
%xs = shl i6 %x , %z
@@ -18,9 +17,8 @@ define i6 @add_shl_same_amount(i6 %x, i6 %y, i6 %z) {
18
17
19
18
define <2 x i4 > @add_shl_same_amount_nsw (<2 x i4 > %x , <2 x i4 > %y , <2 x i4 > %z ) {
20
19
; CHECK-LABEL: @add_shl_same_amount_nsw(
21
- ; CHECK-NEXT: [[XS:%.*]] = shl nsw <2 x i4> [[X:%.*]], [[Z:%.*]]
22
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw <2 x i4> [[Y:%.*]], [[Z]]
23
- ; CHECK-NEXT: [[DIFF:%.*]] = add nsw <2 x i4> [[XS]], [[YS]]
20
+ ; CHECK-NEXT: [[TMP1:%.*]] = add nsw <2 x i4> [[X:%.*]], [[Y:%.*]]
21
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nsw <2 x i4> [[TMP1]], [[Z:%.*]]
24
22
; CHECK-NEXT: ret <2 x i4> [[DIFF]]
25
23
;
26
24
%xs = shl nsw <2 x i4 > %x , %z
@@ -31,9 +29,8 @@ define <2 x i4> @add_shl_same_amount_nsw(<2 x i4> %x, <2 x i4> %y, <2 x i4> %z)
31
29
32
30
define i64 @add_shl_same_amount_nuw (i64 %x , i64 %y , i64 %z ) {
33
31
; CHECK-LABEL: @add_shl_same_amount_nuw(
34
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i64 [[X:%.*]], [[Z:%.*]]
35
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw i64 [[Y:%.*]], [[Z]]
36
- ; CHECK-NEXT: [[DIFF:%.*]] = add nuw i64 [[XS]], [[YS]]
32
+ ; CHECK-NEXT: [[TMP1:%.*]] = add nuw i64 [[X:%.*]], [[Y:%.*]]
33
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nuw i64 [[TMP1]], [[Z:%.*]]
37
34
; CHECK-NEXT: ret i64 [[DIFF]]
38
35
;
39
36
%xs = shl nuw i64 %x , %z
@@ -46,8 +43,8 @@ define i8 @add_shl_same_amount_nsw_extra_use1(i8 %x, i8 %y, i8 %z) {
46
43
; CHECK-LABEL: @add_shl_same_amount_nsw_extra_use1(
47
44
; CHECK-NEXT: [[XS:%.*]] = shl nuw nsw i8 [[X:%.*]], [[Z:%.*]]
48
45
; CHECK-NEXT: call void @use8(i8 [[XS]])
49
- ; CHECK-NEXT: [[YS :%.*]] = shl nuw nsw i8 [[Y:%.* ]], [[Z ]]
50
- ; CHECK-NEXT: [[DIFF:%.*]] = add nsw i8 [[XS ]], [[YS ]]
46
+ ; CHECK-NEXT: [[TMP1 :%.*]] = add nsw i8 [[X ]], [[Y:%.* ]]
47
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nsw i8 [[TMP1 ]], [[Z ]]
51
48
; CHECK-NEXT: ret i8 [[DIFF]]
52
49
;
53
50
%xs = shl nsw nuw i8 %x , %z
@@ -59,10 +56,10 @@ define i8 @add_shl_same_amount_nsw_extra_use1(i8 %x, i8 %y, i8 %z) {
59
56
60
57
define i8 @add_shl_same_amount_nuw_extra_use2 (i8 %x , i8 %y , i8 %z ) {
61
58
; CHECK-LABEL: @add_shl_same_amount_nuw_extra_use2(
62
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i8 [[X:%.*]], [[Z:%.*]]
63
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw nsw i8 [[Y:%.*]], [[Z]]
59
+ ; CHECK-NEXT: [[YS:%.*]] = shl nuw nsw i8 [[Y:%.*]], [[Z:%.*]]
64
60
; CHECK-NEXT: call void @use8(i8 [[YS]])
65
- ; CHECK-NEXT: [[DIFF:%.*]] = add nuw nsw i8 [[XS]], [[YS]]
61
+ ; CHECK-NEXT: [[TMP1:%.*]] = add nuw i8 [[X:%.*]], [[Y]]
62
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nuw i8 [[TMP1]], [[Z]]
66
63
; CHECK-NEXT: ret i8 [[DIFF]]
67
64
;
68
65
%xs = shl nuw i8 %x , %z
@@ -91,9 +88,8 @@ define i8 @add_shl_same_amount_nsw_nuw_extra_use3(i8 %x, i8 %y, i8 %z) {
91
88
92
89
define i6 @add_shl_same_amount_partial_nsw1 (i6 %x , i6 %y , i6 %z ) {
93
90
; CHECK-LABEL: @add_shl_same_amount_partial_nsw1(
94
- ; CHECK-NEXT: [[XS:%.*]] = shl nsw i6 [[X:%.*]], [[Z:%.*]]
95
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw i6 [[Y:%.*]], [[Z]]
96
- ; CHECK-NEXT: [[DIFF:%.*]] = add i6 [[XS]], [[YS]]
91
+ ; CHECK-NEXT: [[TMP1:%.*]] = add i6 [[X:%.*]], [[Y:%.*]]
92
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
97
93
; CHECK-NEXT: ret i6 [[DIFF]]
98
94
;
99
95
%xs = shl nsw i6 %x , %z
@@ -104,9 +100,8 @@ define i6 @add_shl_same_amount_partial_nsw1(i6 %x, i6 %y, i6 %z) {
104
100
105
101
define i6 @add_shl_same_amount_partial_nsw2 (i6 %x , i6 %y , i6 %z ) {
106
102
; CHECK-LABEL: @add_shl_same_amount_partial_nsw2(
107
- ; CHECK-NEXT: [[XS:%.*]] = shl i6 [[X:%.*]], [[Z:%.*]]
108
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw i6 [[Y:%.*]], [[Z]]
109
- ; CHECK-NEXT: [[DIFF:%.*]] = add nsw i6 [[XS]], [[YS]]
103
+ ; CHECK-NEXT: [[TMP1:%.*]] = add i6 [[X:%.*]], [[Y:%.*]]
104
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
110
105
; CHECK-NEXT: ret i6 [[DIFF]]
111
106
;
112
107
%xs = shl i6 %x , %z
@@ -117,9 +112,8 @@ define i6 @add_shl_same_amount_partial_nsw2(i6 %x, i6 %y, i6 %z) {
117
112
118
113
define i6 @add_shl_same_amount_partial_nuw1 (i6 %x , i6 %y , i6 %z ) {
119
114
; CHECK-LABEL: @add_shl_same_amount_partial_nuw1(
120
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i6 [[X:%.*]], [[Z:%.*]]
121
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw i6 [[Y:%.*]], [[Z]]
122
- ; CHECK-NEXT: [[DIFF:%.*]] = add i6 [[XS]], [[YS]]
115
+ ; CHECK-NEXT: [[TMP1:%.*]] = add i6 [[X:%.*]], [[Y:%.*]]
116
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
123
117
; CHECK-NEXT: ret i6 [[DIFF]]
124
118
;
125
119
%xs = shl nuw i6 %x , %z
@@ -130,9 +124,8 @@ define i6 @add_shl_same_amount_partial_nuw1(i6 %x, i6 %y, i6 %z) {
130
124
131
125
define i6 @add_shl_same_amount_partial_nuw2 (i6 %x , i6 %y , i6 %z ) {
132
126
; CHECK-LABEL: @add_shl_same_amount_partial_nuw2(
133
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i6 [[X:%.*]], [[Z:%.*]]
134
- ; CHECK-NEXT: [[YS:%.*]] = shl i6 [[Y:%.*]], [[Z]]
135
- ; CHECK-NEXT: [[DIFF:%.*]] = add nuw i6 [[XS]], [[YS]]
127
+ ; CHECK-NEXT: [[TMP1:%.*]] = add i6 [[X:%.*]], [[Y:%.*]]
128
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
136
129
; CHECK-NEXT: ret i6 [[DIFF]]
137
130
;
138
131
%xs = shl nuw i6 %x , %z
@@ -143,9 +136,8 @@ define i6 @add_shl_same_amount_partial_nuw2(i6 %x, i6 %y, i6 %z) {
143
136
144
137
define i6 @sub_shl_same_amount (i6 %x , i6 %y , i6 %z ) {
145
138
; CHECK-LABEL: @sub_shl_same_amount(
146
- ; CHECK-NEXT: [[XS:%.*]] = shl i6 [[X:%.*]], [[Z:%.*]]
147
- ; CHECK-NEXT: [[YS:%.*]] = shl i6 [[Y:%.*]], [[Z]]
148
- ; CHECK-NEXT: [[DIFF:%.*]] = sub i6 [[XS]], [[YS]]
139
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub i6 [[X:%.*]], [[Y:%.*]]
140
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
149
141
; CHECK-NEXT: ret i6 [[DIFF]]
150
142
;
151
143
%xs = shl i6 %x , %z
@@ -156,9 +148,8 @@ define i6 @sub_shl_same_amount(i6 %x, i6 %y, i6 %z) {
156
148
157
149
define <2 x i4 > @sub_shl_same_amount_nsw (<2 x i4 > %x , <2 x i4 > %y , <2 x i4 > %z ) {
158
150
; CHECK-LABEL: @sub_shl_same_amount_nsw(
159
- ; CHECK-NEXT: [[XS:%.*]] = shl nsw <2 x i4> [[X:%.*]], [[Z:%.*]]
160
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw <2 x i4> [[Y:%.*]], [[Z]]
161
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nsw <2 x i4> [[XS]], [[YS]]
151
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub nsw <2 x i4> [[X:%.*]], [[Y:%.*]]
152
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nsw <2 x i4> [[TMP1]], [[Z:%.*]]
162
153
; CHECK-NEXT: ret <2 x i4> [[DIFF]]
163
154
;
164
155
%xs = shl nsw <2 x i4 > %x , %z
@@ -169,9 +160,8 @@ define <2 x i4> @sub_shl_same_amount_nsw(<2 x i4> %x, <2 x i4> %y, <2 x i4> %z)
169
160
170
161
define i64 @sub_shl_same_amount_nuw (i64 %x , i64 %y , i64 %z ) {
171
162
; CHECK-LABEL: @sub_shl_same_amount_nuw(
172
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i64 [[X:%.*]], [[Z:%.*]]
173
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw i64 [[Y:%.*]], [[Z]]
174
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nuw i64 [[XS]], [[YS]]
163
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub nuw i64 [[X:%.*]], [[Y:%.*]]
164
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nuw i64 [[TMP1]], [[Z:%.*]]
175
165
; CHECK-NEXT: ret i64 [[DIFF]]
176
166
;
177
167
%xs = shl nuw i64 %x , %z
@@ -184,8 +174,8 @@ define i8 @sub_shl_same_amount_nsw_extra_use1(i8 %x, i8 %y, i8 %z) {
184
174
; CHECK-LABEL: @sub_shl_same_amount_nsw_extra_use1(
185
175
; CHECK-NEXT: [[XS:%.*]] = shl nuw nsw i8 [[X:%.*]], [[Z:%.*]]
186
176
; CHECK-NEXT: call void @use8(i8 [[XS]])
187
- ; CHECK-NEXT: [[YS :%.*]] = shl nuw nsw i8 [[Y:%.* ]], [[Z ]]
188
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nsw i8 [[XS ]], [[YS ]]
177
+ ; CHECK-NEXT: [[TMP1 :%.*]] = sub nsw i8 [[X ]], [[Y:%.* ]]
178
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nsw i8 [[TMP1 ]], [[Z ]]
189
179
; CHECK-NEXT: ret i8 [[DIFF]]
190
180
;
191
181
%xs = shl nsw nuw i8 %x , %z
@@ -197,10 +187,10 @@ define i8 @sub_shl_same_amount_nsw_extra_use1(i8 %x, i8 %y, i8 %z) {
197
187
198
188
define i8 @sub_shl_same_amount_nuw_extra_use2 (i8 %x , i8 %y , i8 %z ) {
199
189
; CHECK-LABEL: @sub_shl_same_amount_nuw_extra_use2(
200
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i8 [[X:%.*]], [[Z:%.*]]
201
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw nsw i8 [[Y:%.*]], [[Z]]
190
+ ; CHECK-NEXT: [[YS:%.*]] = shl nuw nsw i8 [[Y:%.*]], [[Z:%.*]]
202
191
; CHECK-NEXT: call void @use8(i8 [[YS]])
203
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nuw nsw i8 [[XS]], [[YS]]
192
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub nuw i8 [[X:%.*]], [[Y]]
193
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl nuw i8 [[TMP1]], [[Z]]
204
194
; CHECK-NEXT: ret i8 [[DIFF]]
205
195
;
206
196
%xs = shl nuw i8 %x , %z
@@ -229,9 +219,8 @@ define i8 @sub_shl_same_amount_nsw_nuw_extra_use3(i8 %x, i8 %y, i8 %z) {
229
219
230
220
define i6 @sub_shl_same_amount_partial_nsw1 (i6 %x , i6 %y , i6 %z ) {
231
221
; CHECK-LABEL: @sub_shl_same_amount_partial_nsw1(
232
- ; CHECK-NEXT: [[XS:%.*]] = shl nsw i6 [[X:%.*]], [[Z:%.*]]
233
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw i6 [[Y:%.*]], [[Z]]
234
- ; CHECK-NEXT: [[DIFF:%.*]] = sub i6 [[XS]], [[YS]]
222
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub i6 [[X:%.*]], [[Y:%.*]]
223
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
235
224
; CHECK-NEXT: ret i6 [[DIFF]]
236
225
;
237
226
%xs = shl nsw i6 %x , %z
@@ -242,9 +231,8 @@ define i6 @sub_shl_same_amount_partial_nsw1(i6 %x, i6 %y, i6 %z) {
242
231
243
232
define i6 @sub_shl_same_amount_partial_nsw2 (i6 %x , i6 %y , i6 %z ) {
244
233
; CHECK-LABEL: @sub_shl_same_amount_partial_nsw2(
245
- ; CHECK-NEXT: [[XS:%.*]] = shl i6 [[X:%.*]], [[Z:%.*]]
246
- ; CHECK-NEXT: [[YS:%.*]] = shl nsw i6 [[Y:%.*]], [[Z]]
247
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nsw i6 [[XS]], [[YS]]
234
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub i6 [[X:%.*]], [[Y:%.*]]
235
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
248
236
; CHECK-NEXT: ret i6 [[DIFF]]
249
237
;
250
238
%xs = shl i6 %x , %z
@@ -255,9 +243,8 @@ define i6 @sub_shl_same_amount_partial_nsw2(i6 %x, i6 %y, i6 %z) {
255
243
256
244
define i6 @sub_shl_same_amount_partial_nuw1 (i6 %x , i6 %y , i6 %z ) {
257
245
; CHECK-LABEL: @sub_shl_same_amount_partial_nuw1(
258
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i6 [[X:%.*]], [[Z:%.*]]
259
- ; CHECK-NEXT: [[YS:%.*]] = shl nuw i6 [[Y:%.*]], [[Z]]
260
- ; CHECK-NEXT: [[DIFF:%.*]] = sub i6 [[XS]], [[YS]]
246
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub i6 [[X:%.*]], [[Y:%.*]]
247
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
261
248
; CHECK-NEXT: ret i6 [[DIFF]]
262
249
;
263
250
%xs = shl nuw i6 %x , %z
@@ -268,9 +255,8 @@ define i6 @sub_shl_same_amount_partial_nuw1(i6 %x, i6 %y, i6 %z) {
268
255
269
256
define i6 @sub_shl_same_amount_partial_nuw2 (i6 %x , i6 %y , i6 %z ) {
270
257
; CHECK-LABEL: @sub_shl_same_amount_partial_nuw2(
271
- ; CHECK-NEXT: [[XS:%.*]] = shl nuw i6 [[X:%.*]], [[Z:%.*]]
272
- ; CHECK-NEXT: [[YS:%.*]] = shl i6 [[Y:%.*]], [[Z]]
273
- ; CHECK-NEXT: [[DIFF:%.*]] = sub nuw i6 [[XS]], [[YS]]
258
+ ; CHECK-NEXT: [[TMP1:%.*]] = sub i6 [[X:%.*]], [[Y:%.*]]
259
+ ; CHECK-NEXT: [[DIFF:%.*]] = shl i6 [[TMP1]], [[Z:%.*]]
274
260
; CHECK-NEXT: ret i6 [[DIFF]]
275
261
;
276
262
%xs = shl nuw i6 %x , %z
0 commit comments