Lines Matching full:sub

9 ; CHECK-NEXT:    [[TMP1:%.*]] = sub nsw i32 0, [[CTLZ]]
16 %sub = sub i32 32, %ctlz
17 %shl = shl i32 1, %sub
28 ; CHECK-NEXT: [[TMP1:%.*]] = sub nsw i64 0, [[CTLZ]]
35 %sub = sub i64 64, %ctlz
36 %shl = shl i64 1, %sub
46 ; CHECK-NEXT: [[SUB:%.*]] = add i32 [[X:%.*]], -2
47 ; CHECK-NEXT: [[CTLZ:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 [[SUB]], i1 false)
48 ; CHECK-NEXT: [[TMP0:%.*]] = sub nsw i32 0, [[CTLZ]]
54 %sub = add i32 %x, -2
55 %ctlz = tail call i32 @llvm.ctlz.i32(i32 %sub, i1 false)
56 %sub2 = sub nuw nsw i32 32, %ctlz
68 ; CHECK-NEXT: [[TMP1:%.*]] = sub nsw i32 0, [[CTLZ]]
74 %sub = sub i32 32, %ctlz
75 %shl = shl i32 1, %sub
86 ; CHECK-NEXT: [[SUB:%.*]] = add i32 [[X:%.*]], 1
87 ; CHECK-NEXT: [[CTLZ:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 [[SUB]], i1 false)
88 ; CHECK-NEXT: [[TMP0:%.*]] = sub nsw i32 0, [[CTLZ]]
94 %sub = add i32 %x, 1
95 %ctlz = tail call i32 @llvm.ctlz.i32(i32 %sub, i1 false)
96 %sub2 = sub nuw nsw i32 32, %ctlz
107 ; CHECK-NEXT: [[SUB:%.*]] = xor i32 [[X:%.*]], -1
108 ; CHECK-NEXT: [[CTLZ:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 [[SUB]], i1 false)
109 ; CHECK-NEXT: [[TMP0:%.*]] = sub nsw i32 0, [[CTLZ]]
115 %sub = xor i32 %x, -1
116 %ctlz = tail call i32 @llvm.ctlz.i32(i32 %sub, i1 false)
117 %sub2 = sub nuw nsw i32 32, %ctlz
129 ; CHECK-NEXT: [[SUB:%.*]] = sub i32 -2, [[X:%.*]]
130 ; CHECK-NEXT: [[CTLZ:%.*]] = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 [[SUB]], i1 false)
131 ; CHECK-NEXT: [[TMP0:%.*]] = sub nsw i32 0, [[CTLZ]]
137 %sub = sub i32 -2, %x
138 %ctlz = tail call i32 @llvm.ctlz.i32(i32 %sub, i1 false)
139 %sub2 = sub nuw nsw i32 32, %ctlz
151 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 32, [[CTLZ]]
152 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
157 %sub = sub i32 32, %ctlz
158 %shl = shl i32 1, %sub
169 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 32, [[CTLZ]]
170 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
177 %sub = sub i32 32, %ctlz
178 %shl = shl i32 1, %sub
189 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 32, [[CTLZ]]
190 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
197 %sub = sub i32 32, %ctlz
198 %shl = shl i32 1, %sub
204 ; Negative test: wrong sub constant
209 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 33, [[CTLZ]]
210 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
217 %sub = sub i32 33, %ctlz
218 %shl = shl i32 1, %sub
229 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 32, [[CTLZ]]
230 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
238 %sub = sub i32 32, %ctlz
239 %shl = shl i32 1, %sub
246 ; Negative test: the sub result used twice
251 ; CHECK-NEXT: [[SUB:%.*]] = sub nuw nsw i32 32, [[CTLZ]]
252 ; CHECK-NEXT: [[SHL:%.*]] = shl nuw i32 1, [[SUB]]
255 ; CHECK-NEXT: store i32 [[SUB]], ptr [[P:%.*]], align 4
260 %sub = sub i32 32, %ctlz
261 %shl = shl i32 1, %sub
264 store i32 %sub, ptr %p, align 4
273 ; CHECK-NEXT: [[TMP1:%.*]] = sub nsw <4 x i32> zeroinitializer, [[CTLZ]]
280 %sub = sub <4 x i32> <i32 32, i32 32, i32 32, i32 32>, %ctlz
281 %shl = shl <4 x i32> <i32 1, i32 1, i32 1, i32 1>, %sub
289 ; CHECK-NEXT: [[TMP2:%.*]] = sub i32 -2, [[TMP0:%.*]]
291 ; CHECK-NEXT: [[TMP4:%.*]] = sub nsw i32 0, [[TMP3]]
296 %2 = sub nuw i32 -2, %0
298 %4 = sub i32 32, %3
307 ; CHECK-NEXT: [[TMP2:%.*]] = sub nsw i32 -2, [[TMP0:%.*]]
309 ; CHECK-NEXT: [[TMP4:%.*]] = sub nsw i32 0, [[TMP3]]
314 %2 = sub nsw i32 -2, %0
316 %4 = sub i32 32, %3
326 ; CHECK-NEXT: [[TMP1:%.*]] = sub nsw i32 0, [[CTLZ]]
332 %sub = sub i32 32, %ctlz
333 %shl = shl i32 1, %sub