summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/vzip.ll
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2015-09-10 08:42:28 +0000
committerJames Molloy <james.molloy@arm.com>2015-09-10 08:42:28 +0000
commit8c995a93ce8502e44e7b3ef75357ee62e09ba090 (patch)
tree0c40276f05925b8b92f48d51db19906509f6eabb /llvm/test/CodeGen/ARM/vzip.ll
parent6f77949d8b1f8a2abc0186a025d1c49d6dfd9e86 (diff)
downloadbcm5719-llvm-8c995a93ce8502e44e7b3ef75357ee62e09ba090.tar.gz
bcm5719-llvm-8c995a93ce8502e44e7b3ef75357ee62e09ba090.zip
[ARM] Do not use vtrn for vectorshuffle if the order is reversed
The tests in isVTRNMask and isVTRN_v_undef_Mask should also check that the elements of the upper and lower half of the vectorshuffle occur in the correct order when both halves are used. Without this test the code assumes that it is correct to use vector transpose (vtrn) for the masks <1, 1, 0, 0> and <1, 3, 0, 2>, among others, but the transpose actually incorrectly generates shuffles for <0, 0, 1, 1> and <0, 2, 1, 3> in this case. Patch by Jeroen Ketema! llvm-svn: 247254
Diffstat (limited to 'llvm/test/CodeGen/ARM/vzip.ll')
-rw-r--r--llvm/test/CodeGen/ARM/vzip.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/vzip.ll b/llvm/test/CodeGen/ARM/vzip.ll
index e7b7da333f4..24386a236f4 100644
--- a/llvm/test/CodeGen/ARM/vzip.ll
+++ b/llvm/test/CodeGen/ARM/vzip.ll
@@ -295,3 +295,13 @@ entry:
ret <4 x i32> %0
}
+define void @vzip_undef_rev_shufflemask_vtrn(<2 x i32>* %A, <4 x i32>* %B) {
+entry:
+ ; CHECK-LABEL: vzip_undef_rev_shufflemask_vtrn
+ ; CHECK-NOT: vtrn
+ ; CHECK: vzip
+ %tmp1 = load <2 x i32>, <2 x i32>* %A
+ %0 = shufflevector <2 x i32> %tmp1, <2 x i32> undef, <4 x i32> <i32 1, i32 1, i32 0, i32 0>
+ store <4 x i32> %0, <4 x i32>* %B
+ ret void
+}
OpenPOWER on IntegriCloud