diff options
Diffstat (limited to 'test/Transforms/InstSimplify/compare.ll')
-rw-r--r-- | test/Transforms/InstSimplify/compare.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/compare.ll b/test/Transforms/InstSimplify/compare.ll index 57727c9..db5e72f 100644 --- a/test/Transforms/InstSimplify/compare.ll +++ b/test/Transforms/InstSimplify/compare.ll @@ -204,6 +204,24 @@ define i1 @select4(i1 %cond) { ; CHECK: ret i1 %cond } +define i1 @select5(i32 %x) { +; CHECK: @select5 + %c = icmp eq i32 %x, 0 + %s = select i1 %c, i32 1, i32 %x + %c2 = icmp eq i32 %s, 0 + ret i1 %c2 +; CHECK: ret i1 false +} + +define i1 @select6(i32 %x) { +; CHECK: @select6 + %c = icmp sgt i32 %x, 0 + %s = select i1 %c, i32 %x, i32 4 + %c2 = icmp eq i32 %s, 0 + ret i1 %c2 +; CHECK: ret i1 %c2 +} + define i1 @urem1(i32 %X, i32 %Y) { ; CHECK: @urem1 %A = urem i32 %X, %Y |