Home | History | Annotate | Download | only in Hexagon
      1 # RUN: llc -march=hexagon -run-pass hexagon-cext-opt %s -o - | FileCheck %s
      2 
      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.
      6 
      7 # Check that this doesn't crash.
      8 # CHECK: L2_loadrb_io %fixed-stack.0, 1496
      9 
     10 --- |
     11   target triple = "hexagon"
     12 
     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 }
     15   %s.2 = type { %s.3 }
     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 }
     20   %s.7 = type { %s.8 }
     21   %s.8 = type { i64, i64, i64, i64, i64, i64, i64, i64 }
     22   %s.9 = type { i8, i8 }
     23 
     24   ; Function Attrs: nounwind optsize
     25   define dso_local void @f0(%s.0* byval nocapture readonly align 8 %a0) local_unnamed_addr #0 {
     26   b0:
     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
     30     unreachable
     31   }
     32 
     33   ; Function Attrs: nounwind optsize
     34   declare dso_local i8* @f1(i8 signext) local_unnamed_addr #0
     35 
     36   attributes #0 = { nounwind optsize "target-cpu"="hexagonv65" }
     37 
     38 ...
     39 
     40 name: f0
     41 tracksRegLiveness: true
     42 fixedStack:
     43 - { id: 0, offset: 0, size: 1504, alignment: 8, isImmutable: true, isAliased: false }
     44 body: |
     45   bb.0:
     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
     48     $r0 = COPY %0:intregs
     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
     51 ...
     52