xref: /llvm-project/llvm/test/Analysis/DotMachineCFG/AMDGPU/functions.mir (revision ebf01690d9b3d922909d9aecdf1db1a944a56298)
1# RUN: llc -mtriple=amdgcn-- -run-pass=dot-machine-cfg  -mcfg-dot-filename-prefix=%t -mcfg-func-name=func2 -o -  %s 2>&1 > /dev/null
2# RUN: FileCheck %s -input-file=%t.func2.dot --check-prefix=MCFG
3
4# MCFG-NOT: digraph "Machine CFG for 'func1' function"
5name: func1
6body: |
7  bb.0:
8    $sgpr0 = S_LOAD_DWORD_IMM $sgpr10_sgpr11, 0, 0
9    $sgpr1 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
10    S_ENDPGM 0
11...
12
13# MCFG: digraph "Machine CFG for 'func2' function"
14# MCFG-NEXT: label="Machine CFG for 'func2' function"
15# MCFG: Node{{[0-9A-Za-z]*}} [shape=record,label="{bb.0:\l| $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0\l $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0\l $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0\l S_ENDPGM 0\l}"];
16---
17name: func2
18body: |
19  bb.0:
20    $sgpr0 = S_LOAD_DWORD_IMM $sgpr12_sgpr13, 0, 0
21    $sgpr1 = S_LOAD_DWORD_IMM $sgpr6_sgpr7, 0, 0
22    $sgpr2 = S_LOAD_DWORD_IMM $sgpr14_sgpr15, 0, 0
23    S_ENDPGM 0
24...
25