reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    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
# RUN: llc -mtriple=aarch64-- -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s

--- |
  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"

  define void @unconditional_br() { ret void }
  define void @conditional_br() { ret void }
  define void @indirect_br() { ret void }
...

---
# CHECK-LABEL: name: unconditional_br
name:            unconditional_br
legalized:       true
regBankSelected: true

# CHECK:  body:
# CHECK:   bb.0:
# CHECK:    successors: %bb.0
# CHECK:    B %bb.0
body:             |
  bb.0:
    successors: %bb.0

    G_BR %bb.0
...

---
# CHECK-LABEL: name: conditional_br
name:            conditional_br
legalized:       true
regBankSelected: true

registers:
  - { id: 0, class: gpr }
  - { id: 1, class: gpr }

# CHECK:  body:
# CHECK:   bb.0:
# CHECK:    TBNZW %1, 0, %bb.1
# CHECK:    B %bb.0
body:             |
  bb.0:
    successors: %bb.0, %bb.1
    %1(s32) = COPY $w0
    %0(s1) = G_TRUNC %1
    G_BRCOND %0(s1), %bb.1
    G_BR %bb.0

  bb.1:
...

---
# CHECK-LABEL: name: indirect_br
name:            indirect_br
legalized:       true
regBankSelected: true

registers:
  - { id: 0, class: gpr }

# CHECK:  body:
# CHECK:   bb.0:
# CHECK:    %0:gpr64 = COPY $x0
# CHECK:    BR %0
body:             |
  bb.0:
    successors: %bb.0, %bb.1
    %0(p0) = COPY $x0
    G_BRINDIRECT %0(p0)

  bb.1:
...