Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/InstCombine/assume.ll @ 134:3a76565eade5 LLVM5.0.1
update 5.0.1
author | mir3636 |
---|---|
date | Sat, 17 Feb 2018 09:57:20 +0900 |
parents | 803732b1fca8 |
children | c2174574ed3a |
comparison
equal
deleted
inserted
replaced
133:c60214abe0e8 | 134:3a76565eade5 |
---|---|
273 tail call void @llvm.assume(i1 %cmp) | 273 tail call void @llvm.assume(i1 %cmp) |
274 %rval = icmp eq i32* %load, null | 274 %rval = icmp eq i32* %load, null |
275 ret i1 %rval | 275 ret i1 %rval |
276 } | 276 } |
277 | 277 |
278 ; PR35846 - https://bugs.llvm.org/show_bug.cgi?id=35846 | |
279 | |
280 define i32 @assumption_conflicts_with_known_bits(i32 %a, i32 %b) { | |
281 ; CHECK-LABEL: @assumption_conflicts_with_known_bits( | |
282 ; CHECK-NEXT: tail call void @llvm.assume(i1 false) | |
283 ; CHECK-NEXT: ret i32 0 | |
284 ; | |
285 %and1 = and i32 %b, 3 | |
286 %B1 = lshr i32 %and1, %and1 | |
287 %B3 = shl nuw nsw i32 %and1, %B1 | |
288 %cmp = icmp eq i32 %B3, 1 | |
289 tail call void @llvm.assume(i1 %cmp) | |
290 %cmp2 = icmp eq i32 %B1, %B3 | |
291 tail call void @llvm.assume(i1 %cmp2) | |
292 ret i32 %and1 | |
293 } | |
294 | |
278 | 295 |
279 attributes #0 = { nounwind uwtable } | 296 attributes #0 = { nounwind uwtable } |
280 attributes #1 = { nounwind } | 297 attributes #1 = { nounwind } |
281 | 298 |