diff options
author | Chris Lattner <sabre@nondot.org> | 2003-01-13 00:57:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-01-13 00:57:49 +0000 |
commit | 8e4a9144ecd0bff747cd69fe7eac2340f2c156b2 (patch) | |
tree | a2b7e1b7a100f22d6f01c779394c4ed1c608f25a /test/ExecutionEngine/test-shift.ll | |
parent | 6ce8d60a70b35e78e4ab79f198186b09b4c0378c (diff) | |
download | llvm-8e4a9144ecd0bff747cd69fe7eac2340f2c156b2.tar.gz llvm-8e4a9144ecd0bff747cd69fe7eac2340f2c156b2.tar.bz2 llvm-8e4a9144ecd0bff747cd69fe7eac2340f2c156b2.tar.xz |
test the shift cases for long that are implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/test-shift.ll')
-rw-r--r-- | test/ExecutionEngine/test-shift.ll | 50 |
1 files changed, 27 insertions, 23 deletions
diff --git a/test/ExecutionEngine/test-shift.ll b/test/ExecutionEngine/test-shift.ll index 475574996a..289a5899ad 100644 --- a/test/ExecutionEngine/test-shift.ll +++ b/test/ExecutionEngine/test-shift.ll @@ -1,27 +1,31 @@ ; test shifts int %main() { - %i = add int 10, 0 - %u = add uint 20, 0 - %shamt = add ubyte 0, 0 - %shamt2 = add ubyte 1, 0 - %shamt3 = add ubyte 2, 0 - %shamt4 = add ubyte 3, 0 - ; constantShiftAmount isRightShift isOperandUnsigned - ; 0 0 0 - %temp01 = shl int %i, ubyte %shamt - ; 0 0 1 - %temp02 = shl uint %u, ubyte %shamt2 - ; 0 1 0 - %temp03 = shr int %i, ubyte %shamt3 - ; 0 1 1 - %temp04 = shr uint %u, ubyte %shamt4 - ; 1 0 0 - %temp05 = shl int %i, ubyte 4 - ; 1 0 1 - %temp06 = shl uint %u, ubyte 5 - ; 1 1 0 - %temp07 = shr int %i, ubyte 6 - ; 1 1 1 - %temp08 = shr uint %u, ubyte 7 + %shamt = add ubyte 0, 1 + + ; Left shifts... + %t1 = shl int 1, ubyte %shamt + %t2 = shl int 1, ubyte 4 + + %t1 = shl uint 1, ubyte %shamt + %t2 = shl uint 1, ubyte 5 + + ;%t1 = shl long 1, ubyte %shamt + %t2 = shl long 1, ubyte 4 + + ;%t1 = shl ulong 1, ubyte %shamt + %t2 = shl ulong 1, ubyte 5 + + ; Right shifts... + %t1 = shr int 1, ubyte %shamt + %t2 = shr int 1, ubyte 4 + + %t1 = shr uint 1, ubyte %shamt + %t2 = shr uint 1, ubyte 5 + + ;%t1 = shr long 1, ubyte %shamt + %t2 = shr long 1, ubyte 4 + + ;%t1 = shr ulong 1, ubyte %shamt + %t2 = shr ulong 1, ubyte 5 ret int 0 } |