summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorKevin Qin <Kevin.Qin@arm.com>2014-07-24 02:05:42 +0000
committerKevin Qin <Kevin.Qin@arm.com>2014-07-24 02:05:42 +0000
commit9a2a2c502b34a4697930c2c6bfbbf460c27b08c8 (patch)
tree6aca220c0ac5103ba4e833e38606a300c2936f2c /llvm/test
parent9e7da0fb44b6d999700ba96743b16c1c112c2baa (diff)
downloadbcm5719-llvm-9a2a2c502b34a4697930c2c6bfbbf460c27b08c8.tar.gz
bcm5719-llvm-9a2a2c502b34a4697930c2c6bfbbf460c27b08c8.zip
[AArch64] Fix a bug generating incorrect instruction when building small vector.
This bug is introduced by r211144. The element of operand may be smaller than the element of result, but previous commit can only handle the contrary condition. This commit is to handle this scenario and generate optimized codes like ZIP1. llvm-svn: 213830
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AArch64/neon-perm.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/neon-perm.ll b/llvm/test/CodeGen/AArch64/neon-perm.ll
index 4f8571db748..41e391dcd76 100644
--- a/llvm/test/CodeGen/AArch64/neon-perm.ll
+++ b/llvm/test/CodeGen/AArch64/neon-perm.ll
@@ -1387,6 +1387,13 @@ entry:
ret <8 x i16> %shuffle.i
}
+define <4 x i8> @test_vzip1_v4i8(<8 x i8> %p) {
+; CHECK-LABEL: test_vzip1_v4i8:
+; CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+ %lo = shufflevector <8 x i8> %p, <8 x i8> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ ret <4 x i8> %lo
+}
+
define <8 x i8> @test_same_vzip2_s8(<8 x i8> %a) {
; CHECK-LABEL: test_same_vzip2_s8:
; CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
OpenPOWER on IntegriCloud