diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-08-09 03:04:23 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-08-09 03:04:23 +0000 |
commit | b33ea564485b430508ab94cf085fd47d7f0e49b0 (patch) | |
tree | d8e9f29daedf73eedfca4a95b940f60702233bbf /test/CodeGen/X86/avx-basic.ll | |
parent | e5118ab7bb4fe184c2c183002158609e5e812791 (diff) | |
download | llvm-b33ea564485b430508ab94cf085fd47d7f0e49b0.tar.gz llvm-b33ea564485b430508ab94cf085fd47d7f0e49b0.tar.bz2 llvm-b33ea564485b430508ab94cf085fd47d7f0e49b0.tar.xz |
Rename and tidy up tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137103 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-basic.ll')
-rw-r--r-- | test/CodeGen/X86/avx-basic.ll | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-basic.ll b/test/CodeGen/X86/avx-basic.ll new file mode 100644 index 0000000000..8a24a58194 --- /dev/null +++ b/test/CodeGen/X86/avx-basic.ll @@ -0,0 +1,44 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s + +@x = common global <8 x float> zeroinitializer, align 32 +@y = common global <4 x double> zeroinitializer, align 32 +@z = common global <4 x float> zeroinitializer, align 16 + +define void @zero128() nounwind ssp { +entry: + ; CHECK: vxorps + ; CHECK: vmovaps + store <4 x float> zeroinitializer, <4 x float>* @z, align 16 + ret void +} + +define void @zero256() 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 +} + +; CHECK: vpcmpeqd +; CHECK: vinsertf128 $1 +define void @ones([0 x float]* nocapture %RET, [0 x float]* nocapture %aFOO) nounwind { +allocas: + %ptr2vec615 = bitcast [0 x float]* %RET to <8 x float>* + store <8 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float +0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float +0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000>, <8 x +float>* %ptr2vec615, align 32 + ret void +} + +; CHECK: vpcmpeqd +; CHECK: vinsertf128 $1 +define void @ones2([0 x i32]* nocapture %RET, [0 x i32]* nocapture %aFOO) nounwind { +allocas: + %ptr2vec615 = bitcast [0 x i32]* %RET to <8 x i32>* + store <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <8 x i32>* %ptr2vec615, align 32 + ret void +} |