diff options
author | Hao Liu <Hao.Liu@arm.com> | 2014-04-29 01:50:36 +0000 |
---|---|---|
committer | Hao Liu <Hao.Liu@arm.com> | 2014-04-29 01:50:36 +0000 |
commit | 270f09d712d806443dffa4a1e697f91d6934813e (patch) | |
tree | 2e2514d39a153587a41735f0f8a19a6feb37ccab /test | |
parent | aa475b48ccd5432ceffa33310c4a5fd7c3b4d630 (diff) | |
download | llvm-270f09d712d806443dffa4a1e697f91d6934813e.tar.gz llvm-270f09d712d806443dffa4a1e697f91d6934813e.tar.bz2 llvm-270f09d712d806443dffa4a1e697f91d6934813e.tar.xz |
[ARM64]Fix a bug when lowering shuffle vector to an EXT instruction.
E.g. Mask like <-1, -1, 1, ...> will generate incorrect EXT index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ARM64/ext.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ARM64/ext.ll b/test/CodeGen/ARM64/ext.ll index 57d6e0c67b..d368eef172 100644 --- a/test/CodeGen/ARM64/ext.ll +++ b/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. |