diff options
author | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-08-15 19:34:23 +0000 |
commit | 721c201bd55ffb73cb2ba8d39e0570fa38c44e15 (patch) | |
tree | eacfc83d988e4b9d11114387ae7dc41243f2a363 /test/Transforms/InstCombine/cast.ll | |
parent | 2b2816e083a455f7a656ae88b0fd059d1688bb36 (diff) | |
download | FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.zip FreeBSD-src-721c201bd55ffb73cb2ba8d39e0570fa38c44e15.tar.gz |
Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
Diffstat (limited to 'test/Transforms/InstCombine/cast.ll')
-rw-r--r-- | test/Transforms/InstCombine/cast.ll | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index 19d5a0a..56e5ca3 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -457,10 +457,12 @@ define i64 @test50(i64 %A) { %E = sext i32 %D to i64 ret i64 %E ; CHECK: @test50 -; CHECK-NEXT: shl i64 %A, 30 +; lshr+shl will be handled by DAGCombine. +; CHECK-NEXT: lshr i64 %A, 2 +; CHECK-NEXT: shl i64 %a, 32 ; CHECK-NEXT: add i64 {{.*}}, -4294967296 -; CHECK-NEXT: %sext = ashr i64 {{.*}}, 32 -; CHECK-NEXT: ret i64 %sext +; CHECK-NEXT: %E = ashr exact i64 {{.*}}, 32 +; CHECK-NEXT: ret i64 %E } define i64 @test51(i64 %A, i1 %cond) { @@ -677,3 +679,18 @@ define i64 @test_mmx_const(<2 x i32> %c) nounwind { ; CHECK: @test_mmx_const ; CHECK-NOT: x86_mmx } + +; PR12514 +define i1 @test67(i1 %a, i32 %b) { + %tmp2 = zext i1 %a to i32 + %conv6 = xor i32 %tmp2, 1 + %and = and i32 %b, %conv6 + %sext = shl nuw nsw i32 %and, 24 + %neg.i = xor i32 %sext, -16777216 + %conv.i.i = ashr exact i32 %neg.i, 24 + %trunc = trunc i32 %conv.i.i to i8 + %tobool.i = icmp eq i8 %trunc, 0 + ret i1 %tobool.i +; CHECK: @test67 +; CHECK: ret i1 false +} |