File: arm-insert-subvector.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (34 lines) | stat: -rw-r--r-- 1,146 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
; RUN: llc -mtriple armv8-unknown-linux -o - < %s | FileCheck %s

define <2 x float> @test_float(ptr %src) {
  %v= load <6 x float>, ptr %src, align 1
  %r = shufflevector <6 x float> %v, <6 x float> undef, <2 x i32> <i32 2, i32 5>
  ret <2 x float> %r
}
; CHECK-LABEL: test_float
; CHECK: vld3.32    {d16, d17, d18}, [r0]

define <2 x i32> @test_i32(ptr %src) {
  %v= load <6 x i32>, ptr %src, align 1
  %r = shufflevector <6 x i32> %v, <6 x i32> undef, <2 x i32> <i32 2, i32 5>
  ret <2 x i32> %r
}
; CHECK-LABEL:  test_i32
; CHECK: vld3.32    {d16, d17, d18}, [r0]

define <4 x i16> @test_i16(ptr %src) {
  %v= load <12 x i16>, ptr %src, align 1
  %r = shufflevector <12 x i16> %v, <12 x i16> undef, <4 x i32> <i32 2, i32 5, i32 8, i32 7>
  ret <4 x i16> %r
}
; CHECK-LABEL: test_i16
; CHECK:    vld1.8  {d16, d17}, [r0]!
; CHECK:    vmov.u16    r1, d16[2]

define <8 x i8> @test_i8(ptr %src) {
  %v= load <24 x i8>, ptr %src, align 1
  %r = shufflevector <24 x i8> %v, <24 x i8> undef, <8 x i32> <i32 2, i32 5, i32 8, i32 11, i32 14, i32 17, i32 20, i32 23>
  ret <8 x i8> %r
}
; CHECK-LABEL: test_i8
; CHECK:    vld3.8	{d16, d17, d18}, [r0]