50 lines · plain
1# We do not support the call site info for the target now, so we use the experimental option (-emit-call-site-info -debug-entry-values).2 3# RUN: llc -emit-call-site-info -debug-entry-values -run-pass=none -verify-machineinstrs -o - %s | FileCheck %s4 5# Verify that it is possible to read and write MIR where a callSites entry6# points to a call residing in a bundle. The offset should point to the call7# instruction, rather than the bundle head.8 9# CHECK: name: caller10# CHECK: callSites:11# CHECK-NEXT: bb: 0, offset: 3, fwdArgRegs:12# CHECK-NEXT: arg: 0, reg: '$r0'13 14# XXX: Please note that at the time of creating this test the Hexagon target15# did not support call site information, so the "callSites" array has been16# manually added.17 18--- |19 target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"20 target triple = "hexagon"21 22 define i32 @caller() {23 entry:24 tail call void @callee(i32 12345)25 ret i32 026 }27 28 declare void @callee(i32)29 30...31---32name: caller33tracksRegLiveness: true34callSites:35 - { bb: 0, offset: 3, fwdArgRegs:36 - { arg: 0, reg: '$r0' } }37body: |38 bb.0.entry:39 BUNDLE implicit-def $r29, implicit-def $r30, implicit-def dead $r0, implicit-def dead $pc, implicit-def dead $r31, implicit $r29, implicit killed $framekey, implicit killed $framelimit, implicit killed $r30, implicit killed $r31 {40 $r29 = S2_allocframe $r29, 0, implicit-def $r30, implicit killed $framekey, implicit killed $framelimit, implicit killed $r30, implicit killed $r31 :: (store (s32) into stack)41 $r0 = A2_tfrsi 1234542 J2_call @callee, hexagoncsr, implicit-def dead $pc, implicit-def dead $r31, implicit internal killed $r29, implicit internal killed $r0, implicit-def $r2943 }44 BUNDLE implicit-def dead $r0, implicit-def $d15, implicit-def $r30, implicit-def $r31, implicit-def $pc, implicit-def $r29, implicit killed $r30, implicit killed $framekey {45 $r0 = A2_tfrsi 046 $d15 = L4_return killed $r30, implicit-def $pc, implicit-def $r29, implicit killed $framekey, implicit-def dead $pc, implicit internal killed $r047 }48 49...50