aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2012-01-24 13:54:13 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2012-01-24 13:54:13 +0000
commit28d7e71a3021d55dce21005112f444facbda0398 (patch)
tree8053b24002ccb0ee763e97e33ff35fb505807b40 /test/CodeGen
parent1ee0ecf84a07693c3a517ba030fac8ac1f9f3fbc (diff)
ZERO_EXTEND operation is optimized for AVX.
v8i16 -> v8i32, v4i32 -> v4i64 - used vpunpck* instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rwxr-xr-xtest/CodeGen/X86/avx-zext.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-zext.ll b/test/CodeGen/X86/avx-zext.ll
new file mode 100755
index 0000000000..795a7b3dd4
--- /dev/null
+++ b/test/CodeGen/X86/avx-zext.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
+
+define <8 x i32> @zext_8i16_to_8i32(<8 x i16> %A) nounwind uwtable readnone ssp {
+;CHECK: zext_8i16_to_8i32
+;CHECK: vpunpckhwd
+
+ %B = zext <8 x i16> %A to <8 x i32>
+ ret <8 x i32>%B
+}
+
+define <4 x i64> @zext_4i32_to_4i64(<4 x i32> %A) nounwind uwtable readnone ssp {
+;CHECK: zext_4i32_to_4i64
+;CHECK: vpunpckhdq
+
+ %B = zext <4 x i32> %A to <4 x i64>
+ ret <4 x i64>%B
+}