Lines Matching refs:ov
4 %ov.result.32 = type { i32, i1 }
9 declare %ov.result.32 @llvm.sadd.with.overflow.i32(i32, i32) nounwind readnone
10 declare %ov.result.32 @llvm.uadd.with.overflow.i32(i32, i32) nounwind readnone
11 declare %ov.result.32 @llvm.ssub.with.overflow.i32(i32, i32) nounwind readnone
12 declare %ov.result.32 @llvm.usub.with.overflow.i32(i32, i32) nounwind readnone
13 declare %ov.result.32 @llvm.smul.with.overflow.i32(i32, i32) nounwind readnone
14 declare %ov.result.32 @llvm.umul.with.overflow.i32(i32, i32) nounwind readnone
108 define %ov.result.32 @saddtest_nsw(i8 %a, i8 %b) {
111 %x = call %ov.result.32 @llvm.sadd.with.overflow.i32(i32 %A, i32 %B)
112 ret %ov.result.32 %x
115 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
116 ; CHECK-NEXT: ret %ov.result.32 %1
119 define %ov.result.32 @uaddtest_nuw(i32 %a, i32 %b) {
122 %x = call %ov.result.32 @llvm.uadd.with.overflow.i32(i32 %A, i32 %B)
123 ret %ov.result.32 %x
126 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
127 ; CHECK-NEXT: ret %ov.result.32 %1
130 define %ov.result.32 @ssubtest_nsw(i8 %a, i8 %b) {
133 %x = call %ov.result.32 @llvm.ssub.with.overflow.i32(i32 %A, i32 %B)
134 ret %ov.result.32 %x
137 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
138 ; CHECK-NEXT: ret %ov.result.32 %1
141 define %ov.result.32 @usubtest_nuw(i32 %a, i32 %b) {
144 %x = call %ov.result.32 @llvm.usub.with.overflow.i32(i32 %A, i32 %B)
145 ret %ov.result.32 %x
148 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
149 ; CHECK-NEXT: ret %ov.result.32 %1
152 define %ov.result.32 @smultest1_nsw(i32 %a, i32 %b) {
155 %x = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %A, i32 %B)
156 ret %ov.result.32 %x
159 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
160 ; CHECK-NEXT: ret %ov.result.32 %1
163 define %ov.result.32 @smultest2_nsw(i32 %a, i32 %b) {
166 %x = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %A, i32 %B)
167 ret %ov.result.32 %x
170 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
171 ; CHECK-NEXT: ret %ov.result.32 %1
174 define %ov.result.32 @smultest3_sw(i32 %a, i32 %b) {
177 %x = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %A, i32 %B)
178 ret %ov.result.32 %x
180 ; CHECK: %x = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %A, i32 %B)
181 ; CHECK-NEXT: ret %ov.result.32 %x
184 define %ov.result.32 @umultest_nuw(i32 %a, i32 %b) {
187 %x = call %ov.result.32 @llvm.umul.with.overflow.i32(i32 %A, i32 %B)
188 ret %ov.result.32 %x
191 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
192 ; CHECK-NEXT: ret %ov.result.32 %1
219 %mul = call %ov.result.32 @llvm.umul.with.overflow.i32(i32 %shr, i32 3)
220 %ov = extractvalue %ov.result.32 %mul, 1
221 %res = extractvalue %ov.result.32 %mul, 0
222 %ret = select i1 %ov, i32 -1, i32 %res
232 %mul = call %ov.result.32 @llvm.umul.with.overflow.i32(i32 %shr, i32 4)
233 %ov = extractvalue %ov.result.32 %mul, 1
234 %res = extractvalue %ov.result.32 %mul, 0
235 %ret = select i1 %ov, i32 -1, i32 %res
241 define %ov.result.32 @umultest5(i32 %x, i32 %y) nounwind {
244 %mul = call %ov.result.32 @llvm.umul.with.overflow.i32(i32 %or_x, i32 %or_y)
245 ret %ov.result.32 %mul
250 ; CHECK-NEXT: %[[ret:.*]] = insertvalue %ov.result.32 { i32 undef, i1 true }, i32 %[[mul]], 0
251 ; CHECK-NEXT: ret %ov.result.32 %[[ret]]
379 %t = call %ov.result.32 @llvm.sadd.with.overflow.i32(i32 %div, i32 1)
380 %obit = extractvalue %ov.result.32 %t, 1
391 %t = call %ov.result.32 @llvm.ssub.with.overflow.i32(i32 %div, i32 1)
392 %obit = extractvalue %ov.result.32 %t, 1
401 %t = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %rem, i32 %rem)
402 %obit = extractvalue %ov.result.32 %t, 1
413 %t = call %ov.result.32 @llvm.smul.with.overflow.i32(i32 %rem, i32 %rem)
414 %obit = extractvalue %ov.result.32 %t, 1
418 define %ov.result.32 @ssubtest_reorder(i8 %a) {
420 %x = call %ov.result.32 @llvm.ssub.with.overflow.i32(i32 0, i32 %A)
421 ret %ov.result.32 %x
424 ; CHECK-NEXT: %1 = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %x, 0
425 ; CHECK-NEXT: ret %ov.result.32 %1
428 define %ov.result.32 @never_overflows_ssub_test0(i32 %a) {
429 %x = call %ov.result.32 @llvm.ssub.with.overflow.i32(i32 %a, i32 0)
430 ret %ov.result.32 %x
432 ; CHECK-NEXT: %[[x:.*]] = insertvalue %ov.result.32 { i32 undef, i1 false }, i32 %a, 0
433 ; CHECK-NEXT: ret %ov.result.32 %[[x]]