aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2010-08-12 02:06:36 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2010-08-12 02:06:36 +0000
commit8c05a850f43cda2e62ac48562281f504ab763d59 (patch)
treecf9cafb61952cf81ab4d62bac5d49f26faf1606c /test/CodeGen
parent270159fcc21e06c67aa571d10d2b22d41d9a751a (diff)
downloadexternal_llvm-8c05a850f43cda2e62ac48562281f504ab763d59.zip
external_llvm-8c05a850f43cda2e62ac48562281f504ab763d59.tar.gz
external_llvm-8c05a850f43cda2e62ac48562281f504ab763d59.tar.bz2
Begin to support some vector operations for AVX 256-bit intructions. The long
term goal here is to be able to match enough of vector_shuffle and build_vector so all avx intrinsics which aren't mapped to their own built-ins but to shufflevector calls can be codegen'd. This is the first (baby) step, support building zeroed vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/avx-256.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-256.ll b/test/CodeGen/X86/avx-256.ll
new file mode 100644
index 0000000..20d31e7
--- /dev/null
+++ b/test/CodeGen/X86/avx-256.ll
@@ -0,0 +1,15 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -march=x86 -mcpu=corei7 -mattr=avx | FileCheck %s
+
+@x = common global <8 x float> zeroinitializer, align 32
+@y = common global <4 x double> zeroinitializer, align 32
+
+define void @zero() nounwind ssp {
+entry:
+ ; CHECK: vxorps
+ ; CHECK: vmovaps
+ ; CHECK: vmovaps
+ store <8 x float> zeroinitializer, <8 x float>* @x, align 32
+ store <4 x double> zeroinitializer, <4 x double>* @y, align 32
+ ret void
+}
+