diff options
Diffstat (limited to 'test/Transforms/InstCombine/cast.ll')
-rw-r--r-- | test/Transforms/InstCombine/cast.ll | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index dc5e928..9361ff2 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -1,7 +1,5 @@ ; Tests to make sure elimination of casts is working correctly -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \ -; RUN: grep %c | notcast -; END. +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep %c | notcast @inbuf = external global [32832 x i8] ; <[32832 x i8]*> [#uses=1] @@ -238,3 +236,21 @@ define i16 @test35(i16 %a) { ret i16 %c2 } +; icmp sgt i32 %a, -1 +; rdar://6480391 +define i1 @test36(i32 %a) { + %b = lshr i32 %a, 31 + %c = trunc i32 %b to i8 + %d = icmp eq i8 %c, 0 + ret i1 %d +} + +; ret i1 false +define i1 @test37(i32 %a) { + %b = lshr i32 %a, 31 + %c = or i32 %b, 512 + %d = trunc i32 %c to i8 + %e = icmp eq i8 %d, 11 + ret i1 %e +} + |