[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/shift-double.llx
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 18 23:37:13 PST 2005
Changes in directory llvm/test/Regression/CodeGen/X86:
shift-double.llx updated: 1.1 -> 1.2
---
Log message:
Add a test for 16-bit sh*d.
---
Diffs of the changes: (+9 -1)
Index: llvm/test/Regression/CodeGen/X86/shift-double.llx
diff -u llvm/test/Regression/CodeGen/X86/shift-double.llx:1.1 llvm/test/Regression/CodeGen/X86/shift-double.llx:1.2
--- llvm/test/Regression/CodeGen/X86/shift-double.llx:1.1 Wed Jan 19 00:30:36 2005
+++ llvm/test/Regression/CodeGen/X86/shift-double.llx Wed Jan 19 01:37:01 2005
@@ -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 @@
%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
+}
More information about the llvm-commits
mailing list