File: inlineasmbr-if-cvt.mir

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (132 lines) | stat: -rw-r--r-- 4,665 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -start-before=if-converter -stop-after=if-converter -o - %s \
# RUN:   -verify-machineinstrs | FileCheck %s
--- |
  ; ModuleID = 'reduced.ll'
  source_filename = "reduced.ll"
  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
  target triple = "armv4t-unknown-linux-gnueabi"

  define void @tusb1210_chg_det_work(i1 %tobool.not) {
  entry:
    br i1 %tobool.not, label %if.else, label %if.then

  if.then:                                          ; preds = %entry
    callbr void asm sideeffect ".word b, ${1:l}, ${0:c}\0A\09", "i,!i"(ptr null)
            to label %if.end [label %if.end.sink.split]

  if.else:                                          ; preds = %entry
    callbr void asm sideeffect ".word b, ${1:l}, ${0:c}\0A\09", "i,!i"(ptr null)
            to label %if.end [label %if.end.sink.split]

  if.end.sink.split:                                ; preds = %if.else, %if.then
    %.sink = phi i32 [ 1, %if.then ], [ 0, %if.else ]
    store i32 %.sink, ptr null, align 4
    br label %if.end

  if.end:                                           ; preds = %if.end.sink.split, %if.else, %if.then
    ret void
  }

...
---
name:            tusb1210_chg_det_work
alignment:       4
exposesReturnsTwice: false
legalized:       false
regBankSelected: false
selected:        false
failedISel:      false
tracksRegLiveness: true
hasWinCFI:       false
callsEHReturn:   false
callsUnwindInit: false
hasEHCatchret:   false
hasEHScopes:     false
hasEHFunclets:   false
debugInstrRef:   false
failsVerification: false
tracksDebugUserValues: true
registers:       []
liveins:
  - { reg: '$r0', virtual-reg: '' }
frameInfo:
  isFrameAddressTaken: false
  isReturnAddressTaken: false
  hasStackMap:     false
  hasPatchPoint:   false
  stackSize:       0
  offsetAdjustment: 0
  maxAlignment:    1
  adjustsStack:    false
  hasCalls:        false
  stackProtector:  ''
  functionContext: ''
  maxCallFrameSize: 0
  cvBytesOfCalleeSavedRegisters: 0
  hasOpaqueSPAdjustment: false
  hasVAStart:      false
  hasMustTailInVarArgFunc: false
  hasTailCall:     false
  localFrameSize:  0
  savePoint:       ''
  restorePoint:    ''
fixedStack:      []
stack:           []
callSites:       []
debugValueSubstitutions: []
constants:       []
machineFunctionInfo: {}
body:             |
  ; CHECK-LABEL: name: tusb1210_chg_det_work
  ; CHECK: bb.0.entry:
  ; CHECK-NEXT:   successors: %bb.1(0x80000000), %bb.2(0x80000000)
  ; CHECK-NEXT:   liveins: $r0
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   TSTri killed renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
  ; CHECK-NEXT:   renamable $r0 = MOVi 0, 1 /* CC::ne */, $cpsr, $noreg
  ; CHECK-NEXT:   renamable $r0 = MOVi 1, 0 /* CC::eq */, killed $cpsr, $noreg, implicit killed $r0
  ; CHECK-NEXT:   INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.1
  ; CHECK-NEXT:   B %bb.2
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.1.if.end.sink.split (machine-block-address-taken, inlineasm-br-indirect-target):
  ; CHECK-NEXT:   successors: %bb.2(0x80000000)
  ; CHECK-NEXT:   liveins: $r0
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   renamable $r1 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
  ; CHECK-NEXT:   STRi12 killed renamable $r0, killed renamable $r1, 0, 14 /* CC::al */, $noreg :: (store (s32) into `ptr null`)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.2.if.end:
  ; CHECK-NEXT:   BX_RET 14 /* CC::al */, $noreg
  bb.0.entry:
    successors: %bb.4(0x40000000), %bb.1(0x40000000)
    liveins: $r0

    TSTri killed renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
    Bcc %bb.4, 1 /* CC::ne */, killed $cpsr

  bb.1.if.then:
    successors: %bb.3(0x80000000), %bb.2(0x00000000)

    renamable $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
    INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.2
    B %bb.3

  bb.2.if.end.sink.split (machine-block-address-taken, inlineasm-br-indirect-target):
    successors: %bb.3(0x80000000)
    liveins: $r0

    renamable $r1 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
    STRi12 killed renamable $r0, killed renamable $r1, 0, 14 /* CC::al */, $noreg :: (store (s32) into `ptr null`)

  bb.3.if.end:
    BX_RET 14 /* CC::al */, $noreg

  bb.4.if.else:
    successors: %bb.3(0x80000000), %bb.2(0x00000000)

    renamable $r0 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
    INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.2
    B %bb.3

...