diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-23 07:16:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-23 07:16:03 +0000 |
commit | 3c4de7fbe08e26ad33af7222742da808dce4dc68 (patch) | |
tree | db2d12cae9d5fc50cc6ea81f03c4ceb40b76c0b9 /test/Transforms/InstCombine/cast.ll | |
parent | 4cb170cc6e21bed3750cb15e2b270d7d0bde50e4 (diff) | |
download | external_llvm-3c4de7fbe08e26ad33af7222742da808dce4dc68.zip external_llvm-3c4de7fbe08e26ad33af7222742da808dce4dc68.tar.gz external_llvm-3c4de7fbe08e26ad33af7222742da808dce4dc68.tar.bz2 |
Add tests for casts that should be eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/cast.ll')
-rw-r--r-- | test/Transforms/InstCombine/cast.ll | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/cast.ll b/test/Transforms/InstCombine/cast.ll index 53e2c2e..be9f608 100644 --- a/test/Transforms/InstCombine/cast.ll +++ b/test/Transforms/InstCombine/cast.ll @@ -82,8 +82,20 @@ int* %test12() { ret int* %c } - ubyte *%test13(long %A) { %c = getelementptr [0 x ubyte]* cast ([32832 x ubyte]* %inbuf to [0 x ubyte]*), long 0, long %A ret ubyte* %c } + +bool %test14(sbyte %A) { + %B = cast sbyte %A to ubyte + %X = setlt ubyte %B, 128 ; setge %A, 0 + ret bool %X +} + +bool %test15(ubyte %A) { + %B = cast ubyte %A to sbyte + %X = setlt sbyte %B, 0 ; setgt %A, 127 + ret bool %X +} + |