diff options
author | Jim Grosbach <grosbach@apple.com> | 2013-03-02 20:16:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2013-03-02 20:16:24 +0000 |
commit | a3c5c769d66f555c11576f981daadf9fbe93a024 (patch) | |
tree | 6e0914c81b6f1d98fc71ecf5b5ea4cfe60272d16 /llvm/test/CodeGen/Thumb2 | |
parent | c6f1914ef081f0aaab1b29d42305aa664ccfbc23 (diff) | |
download | bcm5719-llvm-a3c5c769d66f555c11576f981daadf9fbe93a024.tar.gz bcm5719-llvm-a3c5c769d66f555c11576f981daadf9fbe93a024.zip |
ARM: Creating a vector from a lane of another.
The VDUP instruction source register doesn't allow a non-constant lane
index, so make sure we don't construct a ARM::VDUPLANE node asking it to
do so.
rdar://13328063
http://llvm.org/bugs/show_bug.cgi?id=13963
llvm-svn: 176413
Diffstat (limited to 'llvm/test/CodeGen/Thumb2')
-rw-r--r-- | llvm/test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll b/llvm/test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll new file mode 100644 index 00000000000..937ecc0d667 --- /dev/null +++ b/llvm/test/CodeGen/Thumb2/2013-03-02-vduplane-nonconstant-source-index.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -mtriple=thumbv7-apple-ios | FileCheck %s + +define void @bar(<4 x i32>* %p, i32 %lane, <4 x i32> %phitmp) nounwind { +; CHECK: vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r[[SOURCE:[0-9]+]]:128] +; CHECK: add.w r[[ADDR:[0-9]+]], r[[SOURCE]], {{r[0-9]+}}, lsl #2 +; CHECK: vld1.32 {[[DREG:d[0-9]+]][], [[DREG2:d[0-9]+]][]}, [r[[ADDR]]:32] +; CHECK: vst1.32 {[[DREG]], [[DREG2]]}, [r0] + %val = extractelement <4 x i32> %phitmp, i32 %lane + %r1 = insertelement <4 x i32> undef, i32 %val, i32 1 + %r2 = insertelement <4 x i32> %r1, i32 %val, i32 2 + %r3 = insertelement <4 x i32> %r2, i32 %val, i32 3 + store <4 x i32> %r3, <4 x i32>* %p, align 4 + ret void +} |