diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-19 19:04:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-19 19:04:43 +0000 |
commit | d441d407cf6342f375f12133c9c747f36ee1924f (patch) | |
tree | 741d4775894aa7359d6357db1344eec2964aa4a6 | |
parent | ba1cb38c06c7a1b6eb5589c77a1710a290f179ba (diff) | |
download | bcm5719-llvm-d441d407cf6342f375f12133c9c747f36ee1924f.tar.gz bcm5719-llvm-d441d407cf6342f375f12133c9c747f36ee1924f.zip |
Two new tests for shifts followed by ands
llvm-svn: 8606
-rw-r--r-- | llvm/test/Regression/Transforms/InstCombine/and.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Regression/Transforms/InstCombine/and.ll b/llvm/test/Regression/Transforms/InstCombine/and.ll index 5030a66ba7a..3d8cd70a285 100644 --- a/llvm/test/Regression/Transforms/InstCombine/and.ll +++ b/llvm/test/Regression/Transforms/InstCombine/and.ll @@ -93,3 +93,15 @@ bool %test14(ubyte %A) { %C = setne ubyte %B, 0 ret bool %C } + +ubyte %test15(ubyte %A) { + %B = shr ubyte %A, ubyte 7 + %C = and ubyte %B, 2 ; Always equals zero + ret ubyte %C +} + +ubyte %test16(ubyte %A) { + %B = shl ubyte %A, ubyte 2 + %C = and ubyte %B, 3 + ret ubyte %C +} |