Mercurial > hg > CbC > CbC_llvm
diff 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 |
line wrap: on
line diff
--- a/test/Transforms/InstCombine/assume.ll Fri Feb 16 19:10:49 2018 +0900 +++ b/test/Transforms/InstCombine/assume.ll Sat Feb 17 09:57:20 2018 +0900 @@ -275,6 +275,23 @@ ret i1 %rval } +; PR35846 - https://bugs.llvm.org/show_bug.cgi?id=35846 + +define i32 @assumption_conflicts_with_known_bits(i32 %a, i32 %b) { +; CHECK-LABEL: @assumption_conflicts_with_known_bits( +; CHECK-NEXT: tail call void @llvm.assume(i1 false) +; CHECK-NEXT: ret i32 0 +; + %and1 = and i32 %b, 3 + %B1 = lshr i32 %and1, %and1 + %B3 = shl nuw nsw i32 %and1, %B1 + %cmp = icmp eq i32 %B3, 1 + tail call void @llvm.assume(i1 %cmp) + %cmp2 = icmp eq i32 %B1, %B3 + tail call void @llvm.assume(i1 %cmp2) + ret i32 %and1 +} + attributes #0 = { nounwind uwtable } attributes #1 = { nounwind }