1# RUN: llc -march=hexagon -run-pass hexagon-cext-opt %s -o - | FileCheck %s
2
3# An incorrect assertion was triggered on this code, while attempting to
4# perform a valid transformation.
5
6# CHECK: PS_jmpret
7
8--- |
9  define void @fred() { ret void }
10
11  @array = global [1024 x i8] zeroinitializer, align 8
12...
13
14---
15name: fred
16tracksRegLiveness: true
17registers:
18  - { id: 0, class: intregs }
19  - { id: 1, class: intregs }
20  - { id: 2, class: intregs }
21  - { id: 3, class: predregs }
22  - { id: 4, class: intregs }
23  - { id: 5, class: intregs }
24  - { id: 6, class: intregs }
25  - { id: 7, class: intregs }
26  - { id: 8, class: intregs }
27  - { id: 9, class: intregs }
28
29body: |
30  bb.0:
31    liveins: $r0, $r1
32      %0 = COPY $r1
33      %1 = COPY $r0
34      %2 = A2_tfrsi @array
35      %3 = IMPLICIT_DEF
36      %4 = A2_tfrsi @array+424
37      %5 = M2_macsip %0, %1, 5
38      %6 = A2_addi %2, 704
39      %7 = A2_tfrsi 0
40      S4_pstorerif_rr %3, %6, %5, 2, %7
41      %8 = A2_tfrsi @array+144
42      %9 = C2_mux %3, %4, %8
43      S4_storeiri_io %9, 0, 0
44      PS_jmpret $r31, implicit-def $pc
45...
46