diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2002-10-31 23:05:22 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2002-10-31 23:05:22 +0000 |
commit | 8e0a6bf5560d0e06eed89d4ec3a67f718f0a2391 (patch) | |
tree | 768a32b9ee1ac15334c8761fd2683942a7c73228 /test/ExecutionEngine/test-shift.ll | |
parent | a1719c91309c21e7edd0f72c07592fc309143a9a (diff) | |
download | llvm-8e0a6bf5560d0e06eed89d4ec3a67f718f0a2391.tar.gz llvm-8e0a6bf5560d0e06eed89d4ec3a67f718f0a2391.tar.bz2 llvm-8e0a6bf5560d0e06eed89d4ec3a67f718f0a2391.tar.xz |
A new test case that tries to generate all the different possible shift
opcodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4478 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/ExecutionEngine/test-shift.ll')
-rw-r--r-- | test/ExecutionEngine/test-shift.ll | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/ExecutionEngine/test-shift.ll b/test/ExecutionEngine/test-shift.ll new file mode 100644 index 0000000000..a3156e9a50 --- /dev/null +++ b/test/ExecutionEngine/test-shift.ll @@ -0,0 +1,27 @@ +; test shifts +void %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 + ret void +} |