diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-11-27 06:35:16 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-11-27 06:35:16 +0000 |
commit | c92eea0175736cd91b123a5d25bb9fbdaf8e3ddc (patch) | |
tree | 20a4d9abb038283867bf08ac72964d6fe934d9a9 /llvm/test/CodeGen/ARM/vlddup.ll | |
parent | 3a63f9d852af525a979e33e722d668773952e423 (diff) | |
download | bcm5719-llvm-c92eea0175736cd91b123a5d25bb9fbdaf8e3ddc.tar.gz bcm5719-llvm-c92eea0175736cd91b123a5d25bb9fbdaf8e3ddc.zip |
Add NEON VLD1-dup instructions (load 1 element to all lanes).
llvm-svn: 120194
Diffstat (limited to 'llvm/test/CodeGen/ARM/vlddup.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/vlddup.ll | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/vlddup.ll b/llvm/test/CodeGen/ARM/vlddup.ll new file mode 100644 index 00000000000..f172ed56d96 --- /dev/null +++ b/llvm/test/CodeGen/ARM/vlddup.ll @@ -0,0 +1,41 @@ +; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s + +define <8 x i8> @vld1dupi8(i8* %A) nounwind { +;CHECK: vld1dupi8: +;Check the (default) alignment value. +;CHECK: vld1.8 {d16[]}, [r0] + %tmp1 = load i8* %A, align 8 + %tmp2 = insertelement <8 x i8> undef, i8 %tmp1, i32 0 + %tmp3 = shufflevector <8 x i8> %tmp2, <8 x i8> undef, <8 x i32> zeroinitializer + ret <8 x i8> %tmp3 +} + +define <4 x i16> @vld1dupi16(i16* %A) nounwind { +;CHECK: vld1dupi16: +;Check the alignment value. Max for this instruction is 16 bits: +;CHECK: vld1.16 {d16[]}, [r0, :16] + %tmp1 = load i16* %A, align 8 + %tmp2 = insertelement <4 x i16> undef, i16 %tmp1, i32 0 + %tmp3 = shufflevector <4 x i16> %tmp2, <4 x i16> undef, <4 x i32> zeroinitializer + ret <4 x i16> %tmp3 +} + +define <2 x i32> @vld1dupi32(i32* %A) nounwind { +;CHECK: vld1dupi32: +;Check the alignment value. Max for this instruction is 32 bits: +;CHECK: vld1.32 {d16[]}, [r0, :32] + %tmp1 = load i32* %A, align 8 + %tmp2 = insertelement <2 x i32> undef, i32 %tmp1, i32 0 + %tmp3 = shufflevector <2 x i32> %tmp2, <2 x i32> undef, <2 x i32> zeroinitializer + ret <2 x i32> %tmp3 +} + +define <16 x i8> @vld1dupQi8(i8* %A) nounwind { +;CHECK: vld1dupQi8: +;Check the (default) alignment value. +;CHECK: vld1.8 {d16[], d17[]}, [r0] + %tmp1 = load i8* %A, align 8 + %tmp2 = insertelement <16 x i8> undef, i8 %tmp1, i32 0 + %tmp3 = shufflevector <16 x i8> %tmp2, <16 x i8> undef, <16 x i32> zeroinitializer + ret <16 x i8> %tmp3 +} |