From 8f567bbc2a024d86fe5e8447853b839501f448e6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 6 May 2005 04:11:32 +0000 Subject: [PATCH] new testcase llvm-svn: 21714 --- test/Regression/Transforms/InstCombine/shift.ll | 6 ++++++ test/Regression/Transforms/InstCombine/xor.ll | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/test/Regression/Transforms/InstCombine/shift.ll b/test/Regression/Transforms/InstCombine/shift.ll index e4f1bfb7b10..fd1ac0e8309 100644 --- a/test/Regression/Transforms/InstCombine/shift.ll +++ b/test/Regression/Transforms/InstCombine/shift.ll @@ -158,3 +158,9 @@ bool %test22(ubyte %A) { ret bool %C } +sbyte %test23(int %A) { + %B = shl int %A, ubyte 24 ;; casts not needed + %C = shr int %B, ubyte 24 + %D = cast int %C to sbyte + ret sbyte %D +} diff --git a/test/Regression/Transforms/InstCombine/xor.ll b/test/Regression/Transforms/InstCombine/xor.ll index 8b1e193e24b..57ba596421c 100644 --- a/test/Regression/Transforms/InstCombine/xor.ll +++ b/test/Regression/Transforms/InstCombine/xor.ll @@ -146,3 +146,11 @@ int %test21(bool %C, int %A, int %B) { %D = select bool %C2, int %A, int %B ret int %D } + +int %test22(bool %X) { + %Y = xor bool %X, true + %Z = cast bool %Y to int + %Q = xor int %Z, 1 + ret int %Q +} +