; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
; RUN: llc < %s -O0 -global-isel -mtriple=aarch64 -stop-after=irtranslator | FileCheck %s


%zero = type [0 x i8]

define %zero @test(%zero %x, %zero %y) {
  ; CHECK-LABEL: name: test
  ; CHECK: bb.1.b1:
  ; CHECK-NEXT:   successors: %bb.3(0x40000000), %bb.2(0x40000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
  ; CHECK-NEXT:   G_BRCOND [[DEF]](s1), %bb.3
  ; CHECK-NEXT:   G_BR %bb.2
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.2.b2:
  ; CHECK-NEXT:   successors: %bb.3(0x80000000)
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT:   G_BR %bb.3
  ; CHECK-NEXT: {{  $}}
  ; CHECK-NEXT: bb.3.end:
  ; CHECK-NEXT:   RET_ReallyLR
b1:
  br i1 undef, label %end, label %b2

b2:
  br label %end

end:
  %z = phi %zero [ %y, %b1 ], [ %x, %b2 ]
  ret %zero %z
}
