diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:37:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-19 07:37:01 +0000 |
commit | 39d6396d015414989fcb6b16f80e7cce72382a97 (patch) | |
tree | c8fb1cf5e2aebf60920f60397485f55aa66946ee /test | |
parent | 0df53d22c33c4b34ce1e61dd26eeaee1898c09c0 (diff) | |
download | external_llvm-39d6396d015414989fcb6b16f80e7cce72382a97.zip external_llvm-39d6396d015414989fcb6b16f80e7cce72382a97.tar.gz external_llvm-39d6396d015414989fcb6b16f80e7cce72382a97.tar.bz2 |
Add a test for 16-bit sh*d.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/X86/shift-double.llx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/X86/shift-double.llx b/test/CodeGen/X86/shift-double.llx index ee3bc1e..1c60ddc 100644 --- a/test/CodeGen/X86/shift-double.llx +++ b/test/CodeGen/X86/shift-double.llx @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -disable-pattern-isel=0 | grep sh[lr]d | wc -l | grep 4 +; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel -disable-pattern-isel=0 | grep sh[lr]d | wc -l | grep 5 long %test1(long %X, ubyte %C) { %Y = shl long %X, ubyte %C @@ -20,3 +20,11 @@ uint %test4(uint %A, uint %B, ubyte %C) { %Z = or uint %Y, %X ret uint %Z } + +ushort %test5(ushort %A, ushort %B, ubyte %C) { + %X = shl ushort %A, ubyte %C + %Cv = sub ubyte 16, %C + %Y = shr ushort %B, ubyte %Cv + %Z = or ushort %Y, %X + ret ushort %Z +} |