thumb-select-br.mir 1021 Bytes
# RUN: llc -O0 -mtriple thumb-- -mattr=+v6t2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
--- |
  define void @test_br() { ret void }
...
---
name:            test_br
# CHECK-LABEL: name: test_br
legalized:       true
regBankSelected: true
selected:        false
# CHECK: selected: true
registers:
  - { id: 0, class: gprb }
  - { id: 1, class: gprb }
body:             |
  bb.0:
  ; CHECK: bb.0
    successors: %bb.1(0x40000000), %bb.2(0x40000000)
    liveins: $r0

    %0(s32) = COPY $r0
    ; CHECK: [[COND32:%[0-9]+]]:gpr = COPY $r0
    %1(s1) = G_TRUNC %0(s32)
    ; CHECK: [[COND:%[0-9]+]]:rgpr = COPY [[COND32]]

    G_BRCOND %1(s1), %bb.1
    ; CHECK: t2TSTri [[COND]], 1, 14, $noreg, implicit-def $cpsr
    ; CHECK: t2Bcc %bb.1, 1, $cpsr
    G_BR %bb.2
    ; CHECK: t2B %bb.2, 14, $noreg

  bb.1:
  ; CHECK: bb.1
    successors: %bb.2(0x80000000)

    G_BR %bb.2
    ; CHECK: t2B %bb.2, 14, $noreg

  bb.2:
  ; CHECK: bb.2

    tBX_RET 14, $noreg
    ; CHECK: tBX_RET 14, $noreg
...