File: arm-vlddup-update.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,436 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (43 lines) | stat: -rw-r--r-- 1,949 bytes parent folder | download | duplicates (7)
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
35
36
37
38
39
40
41
42
43
; RUN: llc < %s -mtriple=armv8-linux-gnueabi -verify-machineinstrs \
; RUN:     -asm-verbose=false | FileCheck %s

%struct.uint32x2x2_t = type { <2 x i32>, <2 x i32> }
%struct.uint32x2x3_t = type { <2 x i32>, <2 x i32>, <2 x i32> }
%struct.uint32x2x4_t = type { <2 x i32>, <2 x i32>, <2 x i32>, <2 x i32> }

declare %struct.uint32x2x2_t @llvm.arm.neon.vld2dup.v2i32.p0i8(i8*, i32)
declare %struct.uint32x2x3_t @llvm.arm.neon.vld3dup.v2i32.p0i8(i8*, i32)
declare %struct.uint32x2x4_t @llvm.arm.neon.vld4dup.v2i32.p0i8(i8*, i32)

; CHECK-LABEL: test_vld2_dup_update
; CHECK: vld2.32 {d16[], d17[]}, {{\[}}[[SRC_R:r[0-9]+]]]
; CHECK: add {{r[0-9]+|lr}}, [[SRC_R]], #4
define i8* @test_vld2_dup_update(%struct.uint32x2x2_t* %dest, i8* %src) {
entry:
  %tmp = tail call %struct.uint32x2x2_t @llvm.arm.neon.vld2dup.v2i32.p0i8(i8* %src, i32 4)
  store %struct.uint32x2x2_t %tmp, %struct.uint32x2x2_t* %dest, align 8
  %updated_src = getelementptr inbounds i8, i8* %src, i32 4
  ret i8* %updated_src
}

; CHECK-LABEL: test_vld3_dup_update
; CHECK: vld3.32 {d16[], d17[], d18[]}, {{\[}}[[SRC_R:r[0-9]+]]]
; CHECK: add {{r[0-9]+|lr}}, [[SRC_R]], #4
define i8* @test_vld3_dup_update(%struct.uint32x2x3_t* %dest, i8* %src) {
entry:
  %tmp = tail call %struct.uint32x2x3_t @llvm.arm.neon.vld3dup.v2i32.p0i8(i8* %src, i32 4)
  store %struct.uint32x2x3_t %tmp, %struct.uint32x2x3_t* %dest, align 8
  %updated_src = getelementptr inbounds i8, i8* %src, i32 4
  ret i8* %updated_src
}

; CHECK-LABEL: test_vld4_dup_update
; CHECK: vld4.32 {d16[], d17[], d18[], d19[]}, {{\[}}[[SRC_R:r[0-9]+]]]
; CHECK: add {{r[0-9]+|lr}}, [[SRC_R]], #4
define i8* @test_vld4_dup_update(%struct.uint32x2x4_t* %dest, i8* %src) {
entry:
  %tmp = tail call %struct.uint32x2x4_t @llvm.arm.neon.vld4dup.v2i32.p0i8(i8* %src, i32 4)
  store %struct.uint32x2x4_t %tmp, %struct.uint32x2x4_t* %dest, align 8
  %updated_src = getelementptr inbounds i8, i8* %src, i32 4
  ret i8* %updated_src
}