File: gloal_address.mir

package info (click to toggle)
llvm-toolchain-14 1%3A14.0.6-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,496,180 kB
  • sloc: cpp: 5,593,972; ansic: 986,872; asm: 585,869; python: 184,223; objc: 72,530; lisp: 31,119; f90: 27,793; javascript: 9,780; pascal: 9,762; sh: 9,482; perl: 7,468; ml: 5,432; awk: 3,523; makefile: 2,538; xml: 953; cs: 573; fortran: 567
file content (45 lines) | stat: -rw-r--r-- 1,751 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
--- |

  @.str = private unnamed_addr constant [11 x i8] c"hello %d \0A\00"

  define void @main() {entry: ret void}
  declare i32 @printf(i8*, ...)

...
---
name:            main
alignment:       4
legalized:       true
regBankSelected: true
tracksRegLiveness: true
body:             |
  bb.1.entry:
    ; MIPS32-LABEL: name: main
    ; MIPS32: [[LUi:%[0-9]+]]:gpr32 = LUi target-flags(mips-abs-hi) @.str
    ; MIPS32: [[ADDiu:%[0-9]+]]:gpr32 = ADDiu [[LUi]], target-flags(mips-abs-lo) @.str
    ; MIPS32: [[LUi1:%[0-9]+]]:gpr32 = LUi 18838
    ; MIPS32: [[ORi:%[0-9]+]]:gpr32 = ORi [[LUi1]], 722
    ; MIPS32: [[ORi1:%[0-9]+]]:gpr32 = ORi $zero, 0
    ; MIPS32: ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: $a0 = COPY [[ADDiu]]
    ; MIPS32: $a1 = COPY [[ORi]]
    ; MIPS32: JAL @printf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $v0
    ; MIPS32: ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    ; MIPS32: $v0 = COPY [[ORi1]]
    ; MIPS32: RetRA implicit $v0
    %2:gprb(p0) = G_GLOBAL_VALUE @.str
    %1:gprb(p0) = COPY %2(p0)
    %3:gprb(s32) = G_CONSTANT i32 1234567890
    %4:gprb(s32) = G_CONSTANT i32 0
    ADJCALLSTACKDOWN 16, 0, implicit-def $sp, implicit $sp
    $a0 = COPY %1(p0)
    $a1 = COPY %3(s32)
    JAL @printf, csr_o32, implicit-def $ra, implicit-def $sp, implicit $a0, implicit $a1, implicit-def $v0
    %0:gprb(s32) = COPY $v0
    ADJCALLSTACKUP 16, 0, implicit-def $sp, implicit $sp
    $v0 = COPY %4(s32)
    RetRA implicit $v0

...