aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2008-07-29 15:49:41 +0000
committerNate Begeman <natebegeman@mac.com>2008-07-29 15:49:41 +0000
commitbb1ce94fe83d9d97f9dcd1e6f8943bc4a0b2e63c (patch)
tree873c527b697e72ea9a3cc6b65f14717777db584a /test
parent50fcb9d79fc2831598a3cd4138518f9bfcf24b5d (diff)
downloadexternal_llvm-bb1ce94fe83d9d97f9dcd1e6f8943bc4a0b2e63c.zip
external_llvm-bb1ce94fe83d9d97f9dcd1e6f8943bc4a0b2e63c.tar.gz
external_llvm-bb1ce94fe83d9d97f9dcd1e6f8943bc4a0b2e63c.tar.bz2
Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Assembler/vector-shift.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/Assembler/vector-shift.ll b/test/Assembler/vector-shift.ll
new file mode 100644
index 0000000..3b2c07c
--- /dev/null
+++ b/test/Assembler/vector-shift.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep shl
+; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep ashr
+; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | grep lshr
+
+define <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b) nounwind {
+entry:
+ %cmp = shl <4 x i32> %a, %b ; <4 x i32> [#uses=1]
+ ret <4 x i32> %cmp
+}
+
+define <4 x i32> @bar(<4 x i32> %a, <4 x i32> %b) nounwind {
+entry:
+ %cmp = lshr <4 x i32> %a, %b ; <4 x i32> [#uses=1]
+ ret <4 x i32> %cmp
+}
+
+define <4 x i32> @baz(<4 x i32> %a, <4 x i32> %b) nounwind {
+entry:
+ %cmp = ashr <4 x i32> %a, %b ; <4 x i32> [#uses=1]
+ ret <4 x i32> %cmp
+}