1 # RUN: llc -march=hexagon -run-pass hexagon-cext-opt %s -o - | FileCheck %s
3 # Skip fixed stack indices in hexagon-cext. The reason is that they cannot
4 # be stored as indices (stackSlot2Index) together with registers and
5 # non-fixed stack slots.
7 # Check that this doesn't crash.
8 # CHECK: L2_loadrb_io %fixed-stack.0, 1496
11 target triple = "hexagon"
13 %s.0 = type { %s.1, i32, i8, i8, i8, i8, i8, i64, %s.2, %s.5, i8 }
14 %s.1 = type { i8, i8, i8, i8 }
16 %s.3 = type { i8, i8, %s.4, i32, i8 }
17 %s.4 = type { [3 x i8] }
18 %s.5 = type { i32, i32, [10 x %s.6], %s.9 }
19 %s.6 = type { %s.7, i8, i32, i8, %s.7 }
21 %s.8 = type { i64, i64, i64, i64, i64, i64, i64, i64 }
22 %s.9 = type { i8, i8 }
24 ; Function Attrs: nounwind optsize
25 define dso_local void @f0(%s.0* byval nocapture readonly align 8 %a0) local_unnamed_addr #0 {
27 %v0 = getelementptr inbounds %s.0, %s.0* %a0, i32 0, i32 10
28 %v1 = load i8, i8* %v0, align 8
29 %v2 = tail call i8* @f1(i8 signext %v1) #0
33 ; Function Attrs: nounwind optsize
34 declare dso_local i8* @f1(i8 signext) local_unnamed_addr #0
36 attributes #0 = { nounwind optsize "target-cpu"="hexagonv65" }
41 tracksRegLiveness: true
43 - { id: 0, offset: 0, size: 1504, alignment: 8, isImmutable: true, isAliased: false }
46 %0:intregs = L2_loadrb_io %fixed-stack.0, 1496
47 ADJCALLSTACKDOWN 0, 0, implicit-def $r29, implicit-def dead $r30, implicit $r31, implicit $r30, implicit $r29
49 PS_call_nr @f1, implicit $r0, implicit-def $r29, implicit-def $r0
50 ADJCALLSTACKUP 0, 0, implicit-def dead $r29, implicit-def dead $r30, implicit-def dead $r31, implicit $r29