summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/vext.ll
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-08-17 05:54:34 +0000
committerBob Wilson <bob.wilson@apple.com>2010-08-17 05:54:34 +0000
commit411dfad98175f541c460fc439d34e961e2f584d4 (patch)
treec883cacc1ca4efa6d1c8607f95df0a97caa790a6 /llvm/test/CodeGen/ARM/vext.ll
parent8b637b177c54a4710fc21f84392967bb99d43ddb (diff)
downloadbcm5719-llvm-411dfad98175f541c460fc439d34e961e2f584d4.tar.gz
bcm5719-llvm-411dfad98175f541c460fc439d34e961e2f584d4.zip
Allow more cases of undef shuffle indices and add tests for them.
llvm-svn: 111226
Diffstat (limited to 'llvm/test/CodeGen/ARM/vext.ll')
-rw-r--r--llvm/test/CodeGen/ARM/vext.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/vext.ll b/llvm/test/CodeGen/ARM/vext.ll
index c11a67c6c43..e460a84f626 100644
--- a/llvm/test/CodeGen/ARM/vext.ll
+++ b/llvm/test/CodeGen/ARM/vext.ll
@@ -54,3 +54,23 @@ define <4 x i32> @test_vextq32(<4 x i32>* %A, <4 x i32>* %B) nounwind {
ret <4 x i32> %tmp3
}
+; Undef shuffle indices should not prevent matching to VEXT:
+
+define <8 x i8> @test_vextd_undef(<8 x i8>* %A, <8 x i8>* %B) nounwind {
+;CHECK: test_vextd_undef:
+;CHECK: vext
+ %tmp1 = load <8 x i8>* %A
+ %tmp2 = load <8 x i8>* %B
+ %tmp3 = shufflevector <8 x i8> %tmp1, <8 x i8> %tmp2, <8 x i32> <i32 3, i32 undef, i32 undef, i32 6, i32 7, i32 8, i32 9, i32 10>
+ ret <8 x i8> %tmp3
+}
+
+define <16 x i8> @test_vextRq_undef(<16 x i8>* %A, <16 x i8>* %B) nounwind {
+;CHECK: test_vextRq_undef:
+;CHECK: vext
+ %tmp1 = load <16 x i8>* %A
+ %tmp2 = load <16 x i8>* %B
+ %tmp3 = shufflevector <16 x i8> %tmp1, <16 x i8> %tmp2, <16 x i32> <i32 23, i32 24, i32 25, i32 26, i32 undef, i32 undef, i32 29, i32 30, i32 31, i32 0, i32 1, i32 2, i32 3, i32 4, i32 undef, i32 6>
+ ret <16 x i8> %tmp3
+}
+
OpenPOWER on IntegriCloud