File: arm-legalize-globals.mir

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (29 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (27)
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
# RUN: llc -mtriple arm-- -run-pass=legalizer %s -o - | FileCheck %s
# RUN: llc -mtriple thumb-- -mattr=+v6t2 -run-pass=legalizer %s -o - | FileCheck %s
--- |
  @a_global = global i32 42
  define void @test_global_variable() { ret void }
...
---
name:            test_global_variable
# CHECK-LABEL: name: test_global_variable
legalized:       false
# CHECK: legalized: true
regBankSelected: false
selected:        false
tracksRegLiveness: true
registers:
  - { id: 0, class: _ }
  - { id: 1, class: _ }
body:             |
  bb.0:
    liveins: $r0

    %0(s32) = COPY $r0
    %1(p0) = G_GLOBAL_VALUE @a_global
    ; G_GLOBAL_VALUE is legal, so we should find it unchanged in the output
    ; CHECK: {{%[0-9]+}}:_(p0) = G_GLOBAL_VALUE @a_global
    $r0 = COPY %1(p0)
    BX_RET 14, $noreg, implicit $r0

...