summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/CodeGen/X86/shift-double.llx
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-19 07:37:01 +0000
committerChris Lattner <sabre@nondot.org>2005-01-19 07:37:01 +0000
commit603677549f6d39e3fcce55bd05da4f17edf00fe9 (patch)
treeec937da0cd4f28baf707bab7b2d8cf5352adf68c /llvm/test/Regression/CodeGen/X86/shift-double.llx
parentd54845f5302223433c0ec533ea343eda61121e84 (diff)
downloadbcm5719-llvm-603677549f6d39e3fcce55bd05da4f17edf00fe9.tar.gz
bcm5719-llvm-603677549f6d39e3fcce55bd05da4f17edf00fe9.zip
Add a test for 16-bit sh*d.
llvm-svn: 19688
Diffstat (limited to 'llvm/test/Regression/CodeGen/X86/shift-double.llx')
-rw-r--r--llvm/test/Regression/CodeGen/X86/shift-double.llx10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/test/Regression/CodeGen/X86/shift-double.llx b/llvm/test/Regression/CodeGen/X86/shift-double.llx
index ee3bc1e9925..1c60ddc547d 100644
--- a/llvm/test/Regression/CodeGen/X86/shift-double.llx
+++ b/llvm/test/Regression/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
+}
OpenPOWER on IntegriCloud