Lines Matching refs:overflow
4 ; Check that we simplify llvm.umul.with.overflow, if the overflow check is
5 ; weakened by or (icmp ne %res, 0) %overflow. This is generated by code using
12 declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #0
24 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
25 %overflow = extractvalue { i64, i1 } %res, 1
28 %overflow.1 = or i1 %overflow, %cmp
30 ret i1 %overflow.1
43 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
44 %overflow = extractvalue { i64, i1 } %res, 1
47 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
49 ret i1 %overflow.1
63 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
64 %overflow = extractvalue { i64, i1 } %res, 1
67 %overflow.1 = or i1 %cmp, %overflow
69 ret i1 %overflow.1
83 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
84 %overflow = extractvalue { i64, i1 } %res, 1
87 %overflow.1 = select i1 %cmp, i1 true, i1 %overflow
89 ret i1 %overflow.1
103 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
104 %overflow = extractvalue { i64, i1 } %res, 1
107 %overflow.1 = or i1 %overflow, %cmp
110 ret i1 %overflow.1
124 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
125 %overflow = extractvalue { i64, i1 } %res, 1
128 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
131 ret i1 %overflow.1
138 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
146 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
147 %overflow = extractvalue { i64, i1 } %res, 1
150 %overflow.1 = or i1 %overflow, %cmp
151 call void @use(i1 %overflow)
152 ret i1 %overflow.1
157 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
165 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
166 %overflow = extractvalue { i64, i1 } %res, 1
169 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
170 call void @use(i1 %overflow)
171 ret i1 %overflow.1
174 ; Do not simplify if %overflow and %mul have multiple uses.
177 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
187 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
188 %overflow = extractvalue { i64, i1 } %res, 1
191 %overflow.1 = or i1 %overflow, %cmp
194 call void @use(i1 %overflow)
195 ret i1 %overflow.1
200 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
210 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
211 %overflow = extractvalue { i64, i1 } %res, 1
214 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
217 call void @use(i1 %overflow)
218 ret i1 %overflow.1
225 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
235 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
236 %overflow = extractvalue { i64, i1 } %res, 1
239 %overflow.1 = or i1 %overflow, %cmp
243 ret i1 %overflow.1
248 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
258 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
259 %overflow = extractvalue { i64, i1 } %res, 1
262 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
266 ret i1 %overflow.1
284 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
285 %overflow = extractvalue { i64, i1 } %res, 1
288 %overflow.1 = or i1 %overflow, %cmp
292 ret i1 %overflow.1
307 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
308 %overflow = extractvalue { i64, i1 } %res, 1
311 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
315 ret i1 %overflow.1
322 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
331 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
332 %overflow = extractvalue { i64, i1 } %res, 1
335 %overflow.1 = or i1 %overflow, %cmp
338 ret i1 %overflow.1
343 ; CHECK-NEXT: [[RES:%.*]] = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 [[A:%.*]], i6…
352 %res = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
353 %overflow = extractvalue { i64, i1 } %res, 1
356 %overflow.1 = select i1 %overflow, i1 true, i1 %cmp
359 ret i1 %overflow.1