aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-02-25 06:42:42 +0000
committerBob Wilson <bob.wilson@apple.com>2011-02-25 06:42:42 +0000
commitda52506792f1791682eda34d6319f5967116eb65 (patch)
treedf31ef094dd4aea37c535027cc5d92d367bf1545 /test/CodeGen
parent3fc831779843bb4091f931b10ad0db1d97f82bd2 (diff)
downloadexternal_llvm-da52506792f1791682eda34d6319f5967116eb65.zip
external_llvm-da52506792f1791682eda34d6319f5967116eb65.tar.gz
external_llvm-da52506792f1791682eda34d6319f5967116eb65.tar.bz2
Add patterns to use post-increment addressing for Neon VST1-lane instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM/vstlane.ll26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/vstlane.ll b/test/CodeGen/ARM/vstlane.ll
index 6cc052b..d1bc15a 100644
--- a/test/CodeGen/ARM/vstlane.ll
+++ b/test/CodeGen/ARM/vstlane.ll
@@ -10,6 +10,19 @@ define void @vst1lanei8(i8* %A, <8 x i8>* %B) nounwind {
ret void
}
+;Check for a post-increment updating store.
+define void @vst1lanei8_update(i8** %ptr, <8 x i8>* %B) nounwind {
+;CHECK: vst1lanei8_update:
+;CHECK: vst1.8 {d16[3]}, [r2]!
+ %A = load i8** %ptr
+ %tmp1 = load <8 x i8>* %B
+ %tmp2 = extractelement <8 x i8> %tmp1, i32 3
+ store i8 %tmp2, i8* %A, align 8
+ %tmp3 = getelementptr i8* %A, i32 1
+ store i8* %tmp3, i8** %ptr
+ ret void
+}
+
define void @vst1lanei16(i16* %A, <4 x i16>* %B) nounwind {
;CHECK: vst1lanei16:
;Check the alignment value. Max for this instruction is 16 bits:
@@ -66,6 +79,19 @@ define void @vst1laneQi32(i32* %A, <4 x i32>* %B) nounwind {
ret void
}
+;Check for a post-increment updating store.
+define void @vst1laneQi32_update(i32** %ptr, <4 x i32>* %B) nounwind {
+;CHECK: vst1laneQi32_update:
+;CHECK: vst1.32 {d17[1]}, [r1, :32]!
+ %A = load i32** %ptr
+ %tmp1 = load <4 x i32>* %B
+ %tmp2 = extractelement <4 x i32> %tmp1, i32 3
+ store i32 %tmp2, i32* %A, align 8
+ %tmp3 = getelementptr i32* %A, i32 1
+ store i32* %tmp3, i32** %ptr
+ ret void
+}
+
define void @vst1laneQf(float* %A, <4 x float>* %B) nounwind {
;CHECK: vst1laneQf:
;CHECK: vst1.32 {d17[1]}, [r0]