diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-14 23:02:38 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-14 23:02:38 +0000 |
commit | 69a05a7b9205fd4628ed614d1845f3879f6be949 (patch) | |
tree | b12b2a678dd4f13c0c4fac08ccb353a4cea999b7 /test/CodeGen/ARM | |
parent | b121bfcc22660b1bdfb1183b191b6516988bcaf5 (diff) | |
download | external_llvm-69a05a7b9205fd4628ed614d1845f3879f6be949.zip external_llvm-69a05a7b9205fd4628ed614d1845f3879f6be949.tar.gz external_llvm-69a05a7b9205fd4628ed614d1845f3879f6be949.tar.bz2 |
Generate a VTBL instruction instead of a series of loads and stores when we
can. As Nate pointed out, VTBL isn't super performant, but it *has* to be better
than this:
_shuf:
@ BB#0: @ %entry
push {r4, r7, lr}
add r7, sp, #4
sub sp, #12
mov r4, sp
bic r4, r4, #7
mov sp, r4
mov r2, sp
vmov d16, r0, r1
orr r0, r2, #6
orr r3, r2, #7
vst1.8 {d16[0]}, [r3]
vst1.8 {d16[5]}, [r0]
subs r4, r7, #4
orr r0, r2, #5
vst1.8 {d16[4]}, [r0]
orr r0, r2, #4
vst1.8 {d16[4]}, [r0]
orr r0, r2, #3
vst1.8 {d16[0]}, [r0]
orr r0, r2, #2
vst1.8 {d16[2]}, [r0]
orr r0, r2, #1
vst1.8 {d16[1]}, [r0]
vst1.8 {d16[3]}, [r2]
vldr.64 d16, [sp]
vmov r0, r1, d16
mov sp, r4
pop {r4, r7, pc}
The "illegal" testcase in vext.ll is no longer illegal.
<rdar://problem/9078775>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM')
-rw-r--r-- | test/CodeGen/ARM/vext.ll | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/test/CodeGen/ARM/vext.ll b/test/CodeGen/ARM/vext.ll index 55abefe..c8d9045 100644 --- a/test/CodeGen/ARM/vext.ll +++ b/test/CodeGen/ARM/vext.ll @@ -121,15 +121,3 @@ define <4 x i16> @test_largespan(<8 x i16>* %B) nounwind { %tmp2 = shufflevector <8 x i16> %tmp1, <8 x i16> undef, <4 x i32> <i32 0, i32 2, i32 4, i32 6> ret <4 x i16> %tmp2 } - -; The actual shuffle code only handles some cases, make sure we check -; this rather than blindly emitting a VECTOR_SHUFFLE (infinite -; lowering loop can result otherwise). -define <8 x i8> @test_illegal(<16 x i8>* %A, <16 x i8>* %B) nounwind { -;CHECK: test_illegal: -;CHECK: vst1.8 - %tmp1 = load <16 x i8>* %A - %tmp2 = load <16 x i8>* %B - %tmp3 = shufflevector <16 x i8> %tmp1, <16 x i8> %tmp2, <8 x i32> <i32 0, i32 7, i32 5, i32 25, i32 3, i32 2, i32 2, i32 26> - ret <8 x i8> %tmp3 -} |