1 # RUN: llc -march=hexagon -run-pass hexagon-cext-opt -hexagon-cext-threshold=3 %s -o - | FileCheck %s
4 define void @test0() { ret void }
5 define void @test1() { ret void }
6 define void @test2() { ret void }
7 @global_address = global [1024 x i32] zeroinitializer, align 8
10 # CHECK-LABEL: name: test0
11 # CHECK: [[B:%[0-9]+]]:intregs = A2_tfrsi @global_address
12 # CHECK: L2_loadri_io [[B]], 0
13 # CHECK: L2_loadri_io [[B]], 4
14 # CHECK: L2_loadri_io [[B]], 8
18 - { id: 0, class: intregs }
19 - { id: 1, class: intregs }
20 - { id: 2, class: intregs }
23 %0 = PS_loadriabs @global_address
24 %1 = PS_loadriabs @global_address+4
25 %2 = PS_loadriabs @global_address+8
28 # CHECK-LABEL: name: test1
29 # CHECK: [[C:%[0-9]+]]:intregs = COPY $r0
30 # CHECK: [[B:%[0-9]+]]:intregs = A2_addi [[C]], @global_address
31 # CHECK: L2_loadri_io [[B]], 0
32 # CHECK: L2_loadri_io [[B]], 4
33 # CHECK: L2_loadri_io [[B]], 8
37 - { id: 0, class: intregs }
38 - { id: 1, class: intregs }
39 - { id: 2, class: intregs }
40 - { id: 3, class: intregs }
45 %1 = L4_loadri_ur %0, 0, @global_address
46 %2 = L4_loadri_ur %0, 0, @global_address+4
47 %3 = L4_loadri_ur %0, 0, @global_address+8
50 # CHECK-LABEL: name: test2
51 # CHECK: [[C:%[0-9]+]]:intregs = COPY $r0
52 # CHECK: [[B:%[0-9]+]]:intregs = A2_tfrsi @global_address + 4
53 # CHECK: [[T0:%[0-9]+]]:intregs = A2_addi [[B]], -4
54 # CHECK: $r0 = COPY [[T0]]
55 # CHECK: [[T1:%[0-9]+]]:intregs = A2_addi [[B]], -2
56 # CHECK: $r1 = COPY [[T1]]
57 # CHECK: L4_loadri_rr [[B]], [[C]], 0
61 - { id: 0, class: intregs }
62 - { id: 1, class: intregs }
63 - { id: 2, class: intregs }
64 - { id: 3, class: intregs }
69 %1 = A2_tfrsi @global_address
71 %2 = A2_tfrsi @global_address+2
73 %3 = L4_loadri_ur %0, 0, @global_address+4