summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-09-01 04:18:40 +0000
committerBob Wilson <bob.wilson@apple.com>2009-09-01 04:18:40 +0000
commit71124f698befddb89309758f4aa171e11b9beff3 (patch)
treebf511efdbeb7cf31489194f414bf344dbb3f9d04 /test/CodeGen
parentefbb5330b8d383a393c83d2da5d631c98b0bb3fd (diff)
downloadllvm-71124f698befddb89309758f4aa171e11b9beff3.tar.gz
llvm-71124f698befddb89309758f4aa171e11b9beff3.tar.bz2
llvm-71124f698befddb89309758f4aa171e11b9beff3.tar.xz
Fix pr4843: When an instruction has multiple destination registers that are
tied to different source registers, the TwoAddressInstructionPass needs to be smarter. Change it to check before replacing a source register whether that source register is tied to a different destination register, and if so, defer handling it until a subsequent iteration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll b/test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll
new file mode 100644
index 0000000000..dca3424e18
--- /dev/null
+++ b/test/CodeGen/ARM/2009-08-31-TwoRegShuffle.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=arm -mattr=+neon | FileCheck %s
+; pr4843
+define <4 x i16> @v2regbug(<4 x i16>* %B) nounwind {
+;CHECK: v2regbug:
+;CHECK: vzip.16
+ %tmp1 = load <4 x i16>* %B
+ %tmp2 = shufflevector <4 x i16> %tmp1, <4 x i16> undef, <4 x i32><i32 0, i32 0, i32 1, i32 1>
+ ret <4 x i16> %tmp2
+}