This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/examplefiles/llvm-mir/llvm-mir.mir
Oleh Prypin 6f43092173
Also add auto-updatable output-based tests to examplefiles (#1689)
Co-authored-by: Georg Brandl <georg@python.org>
2021-01-20 10:48:45 +01:00

32 lines
634 B
YAML

# YAML line comment
--- |
; LLVM-IR line comment
define void @myfunction() { ret void }
...
---
name: myfunction
legalized: true
registers:
- { id: 0, class: gpr }
body: |
bb.0.named (address-taken):
liveins: $r0, $r1
successors: %bb.1.alsonamed
; MIR line comment
%0:gpr(s64) = COPY $r0
%1(s32) = COPY $r1
bb.1.alsonamed:
successors: %bb.2
%2(s32) = EXTRACT_SUBREG %1(s32), %subreg.sub0
%3(s32) = G_ADD %0:gpr(s32), %2(s32) killed
%4(s32) = G_CONSTANT i32 1
%5(s32) = G_FCONSTANT float 1.0
%6(p0) = G_LOAD %6(p0) :: (load 4 from %ir.myvar + 4)
bb.2:
$r0 = COPY %3
...