summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM64
diff options
context:
space:
mode:
authorHao Liu <Hao.Liu@arm.com>2014-04-29 01:50:36 +0000
committerHao Liu <Hao.Liu@arm.com>2014-04-29 01:50:36 +0000
commitcf37110920cb1cc801ea8502fa05cb12aee388c0 (patch)
treef1d0f2200c31a54e4bdb9f0d505ece448efe141b /llvm/test/CodeGen/ARM64
parent90d09146e0f89fac7a4bb1d2e29459766fb38165 (diff)
downloadbcm5719-llvm-cf37110920cb1cc801ea8502fa05cb12aee388c0.tar.gz
bcm5719-llvm-cf37110920cb1cc801ea8502fa05cb12aee388c0.zip
[ARM64]Fix a bug when lowering shuffle vector to an EXT instruction.
E.g. Mask like <-1, -1, 1, ...> will generate incorrect EXT index. llvm-svn: 207485
Diffstat (limited to 'llvm/test/CodeGen/ARM64')
-rw-r--r--llvm/test/CodeGen/ARM64/ext.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM64/ext.ll b/llvm/test/CodeGen/ARM64/ext.ll
index 57d6e0c67b1..d368eef172e 100644
--- a/llvm/test/CodeGen/ARM64/ext.ll
+++ b/llvm/test/CodeGen/ARM64/ext.ll
@@ -65,6 +65,15 @@ define <8 x i8> @test_vextd_undef(<8 x i8>* %A, <8 x i8>* %B) nounwind {
ret <8 x i8> %tmp3
}
+define <8 x i8> @test_vextd_undef2(<8 x i8>* %A, <8 x i8>* %B) nounwind {
+;CHECK-LABEL: test_vextd_undef2:
+;CHECK: {{ext.8b.*#6}}
+ %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 undef, i32 undef, i32 undef, i32 undef, i32 2, i32 3, i32 4, i32 5>
+ ret <8 x i8> %tmp3
+}
+
define <16 x i8> @test_vextRq_undef(<16 x i8>* %A, <16 x i8>* %B) nounwind {
;CHECK-LABEL: test_vextRq_undef:
;CHECK: {{ext.16b.*#7}}
@@ -74,6 +83,14 @@ define <16 x i8> @test_vextRq_undef(<16 x i8>* %A, <16 x i8>* %B) nounwind {
ret <16 x i8> %tmp3
}
+define <8 x i16> @test_vextRq_undef2(<8 x i16>* %A) nounwind {
+;CHECK-LABEL: test_vextRq_undef2:
+;CHECK: {{ext.16b.*#10}}
+ %tmp1 = load <8 x i16>* %A
+ %vext = shufflevector <8 x i16> %tmp1, <8 x i16> undef, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 1, i32 2, i32 3, i32 4>
+ ret <8 x i16> %vext;
+}
+
; Tests for ReconstructShuffle function. Indices have to be carefully
; chosen to reach lowering phase as a BUILD_VECTOR.
OpenPOWER on IntegriCloud