diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-27 16:21:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-27 16:21:26 +0000 |
commit | 907c7c7dd149d59d82631ff68687f4f6ea51bb00 (patch) | |
tree | 1378fbf53c810b72c83df112a3232d44b40cf45a /test | |
parent | f63f647345d0305685e837ad7d89181ea643c2e2 (diff) | |
download | llvm-907c7c7dd149d59d82631ff68687f4f6ea51bb00.tar.gz llvm-907c7c7dd149d59d82631ff68687f4f6ea51bb00.tar.bz2 llvm-907c7c7dd149d59d82631ff68687f4f6ea51bb00.tar.xz |
Testcases for rev 250 of InstructionCombining.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/shift.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll index 5fae18ff00..12bc2cd8de 100644 --- a/test/Transforms/InstCombine/shift.ll +++ b/test/Transforms/InstCombine/shift.ll @@ -115,3 +115,33 @@ bool %test16(int %X) { %tmp.7 = setne int %tmp.6, 0 ;; X & 16 != 0 ret bool %tmp.7 } + +bool %test17(uint %A) { + %B = shr uint %A, ubyte 3 + %C = seteq uint %B, 1234 + ret bool %C +} + +bool %test18(ubyte %A) { + %B = shr ubyte %A, ubyte 7 + %C = seteq ubyte %B, 123 ;; false + ret bool %C +} + +bool %test19(int %A) { + %B = shr int %A, ubyte 2 + %C = seteq int %B, 0 ;; (X & -4) == 0 + ret bool %C +} + +bool %test19a(int %A) { + %B = shr int %A, ubyte 2 + %C = seteq int %B, -1 ;; (X & -4) == -4 + ret bool %C +} + +bool %test20(sbyte %A) { + %B = shr sbyte %A, ubyte 7 + %C = seteq sbyte %B, 123 ;; false + ret bool %C +} |