xref: /llvm-project/llvm/test/CodeGen/ARM/inlineasmbr-if-cvt.mir (revision 07c7784d7bf69b9944b92ecc283cac823bcfce16)
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -start-before=if-converter -stop-after=if-converter -o - %s \
3# RUN:   -verify-machineinstrs | FileCheck %s
4--- |
5  ; ModuleID = 'reduced.ll'
6  source_filename = "reduced.ll"
7  target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
8  target triple = "armv4t-unknown-linux-gnueabi"
9
10  define void @tusb1210_chg_det_work(i1 %tobool.not) {
11  entry:
12    br i1 %tobool.not, label %if.else, label %if.then
13
14  if.then:                                          ; preds = %entry
15    callbr void asm sideeffect ".word b, ${1:l}, ${0:c}\0A\09", "i,!i"(ptr null)
16            to label %if.end [label %if.end.sink.split]
17
18  if.else:                                          ; preds = %entry
19    callbr void asm sideeffect ".word b, ${1:l}, ${0:c}\0A\09", "i,!i"(ptr null)
20            to label %if.end [label %if.end.sink.split]
21
22  if.end.sink.split:                                ; preds = %if.else, %if.then
23    %.sink = phi i32 [ 1, %if.then ], [ 0, %if.else ]
24    store i32 %.sink, ptr null, align 4
25    br label %if.end
26
27  if.end:                                           ; preds = %if.end.sink.split, %if.else, %if.then
28    ret void
29  }
30
31...
32---
33name:            tusb1210_chg_det_work
34alignment:       4
35exposesReturnsTwice: false
36legalized:       false
37regBankSelected: false
38selected:        false
39failedISel:      false
40tracksRegLiveness: true
41hasWinCFI:       false
42callsEHReturn:   false
43callsUnwindInit: false
44hasEHCatchret:   false
45hasEHScopes:     false
46hasEHFunclets:   false
47debugInstrRef:   false
48failsVerification: false
49tracksDebugUserValues: true
50registers:       []
51liveins:
52  - { reg: '$r0', virtual-reg: '' }
53frameInfo:
54  isFrameAddressTaken: false
55  isReturnAddressTaken: false
56  hasStackMap:     false
57  hasPatchPoint:   false
58  stackSize:       0
59  offsetAdjustment: 0
60  maxAlignment:    1
61  adjustsStack:    false
62  hasCalls:        false
63  stackProtector:  ''
64  functionContext: ''
65  maxCallFrameSize: 0
66  cvBytesOfCalleeSavedRegisters: 0
67  hasOpaqueSPAdjustment: false
68  hasVAStart:      false
69  hasMustTailInVarArgFunc: false
70  hasTailCall:     false
71  localFrameSize:  0
72  savePoint:       ''
73  restorePoint:    ''
74fixedStack:      []
75stack:           []
76callSites:       []
77debugValueSubstitutions: []
78constants:       []
79machineFunctionInfo: {}
80body:             |
81  ; CHECK-LABEL: name: tusb1210_chg_det_work
82  ; CHECK: bb.0.entry:
83  ; CHECK-NEXT:   successors: %bb.1(0x80000000), %bb.2(0x80000000)
84  ; CHECK-NEXT:   liveins: $r0
85  ; CHECK-NEXT: {{  $}}
86  ; CHECK-NEXT:   TSTri killed renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
87  ; CHECK-NEXT:   renamable $r0 = MOVi 0, 1 /* CC::ne */, $cpsr, $noreg
88  ; CHECK-NEXT:   renamable $r0 = MOVi 1, 0 /* CC::eq */, killed $cpsr, $noreg, implicit killed $r0
89  ; CHECK-NEXT:   INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.1
90  ; CHECK-NEXT:   B %bb.2
91  ; CHECK-NEXT: {{  $}}
92  ; CHECK-NEXT: bb.1.if.end.sink.split (machine-block-address-taken, inlineasm-br-indirect-target):
93  ; CHECK-NEXT:   successors: %bb.2(0x80000000)
94  ; CHECK-NEXT:   liveins: $r0
95  ; CHECK-NEXT: {{  $}}
96  ; CHECK-NEXT:   renamable $r1 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
97  ; CHECK-NEXT:   STRi12 killed renamable $r0, killed renamable $r1, 0, 14 /* CC::al */, $noreg :: (store (s32) into `ptr null`)
98  ; CHECK-NEXT: {{  $}}
99  ; CHECK-NEXT: bb.2.if.end:
100  ; CHECK-NEXT:   BX_RET 14 /* CC::al */, $noreg
101  bb.0.entry:
102    successors: %bb.4(0x40000000), %bb.1(0x40000000)
103    liveins: $r0
104
105    TSTri killed renamable $r0, 1, 14 /* CC::al */, $noreg, implicit-def $cpsr
106    Bcc %bb.4, 1 /* CC::ne */, killed $cpsr
107
108  bb.1.if.then:
109    successors: %bb.3(0x80000000), %bb.2(0x00000000)
110
111    renamable $r0 = MOVi 1, 14 /* CC::al */, $noreg, $noreg
112    INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.2
113    B %bb.3
114
115  bb.2.if.end.sink.split (machine-block-address-taken, inlineasm-br-indirect-target):
116    successors: %bb.3(0x80000000)
117    liveins: $r0
118
119    renamable $r1 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
120    STRi12 killed renamable $r0, killed renamable $r1, 0, 14 /* CC::al */, $noreg :: (store (s32) into `ptr null`)
121
122  bb.3.if.end:
123    BX_RET 14 /* CC::al */, $noreg
124
125  bb.4.if.else:
126    successors: %bb.3(0x80000000), %bb.2(0x00000000)
127
128    renamable $r0 = MOVi 0, 14 /* CC::al */, $noreg, $noreg
129    INLINEASM_BR &".word b, ${1:l}, ${0:c}\0A\09", 9 /* sideeffect mayload attdialect */, 13 /* imm */, 0, 13 /* imm */, %bb.2
130    B %bb.3
131
132...
133