; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=powerpc -relocation-model=pic | \
; RUN:    FileCheck -check-prefixes=SMALL %s

@val = global i8 0, align 1

define zeroext i8 @testbcl() nounwind {
; SMALL-LABEL: testbcl:
; SMALL:       # %bb.0: # %entry
; SMALL-NEXT:    mflr 0
; SMALL-NEXT:    stwu 1, -16(1)
; SMALL-NEXT:    stw 30, 8(1)
; SMALL-NEXT:    stw 0, 20(1)
; SMALL-NEXT:    bcl 20, 31, .L0$pb
; SMALL-NEXT:  .L0$pb:
; SMALL-NEXT:    mflr 30
; SMALL-NEXT:    lwz 3, .L0$poff-.L0$pb(30)
; SMALL-NEXT:    add 30, 3, 30
; SMALL-NEXT:    lwz 3, .LC0-.LTOC(30)
; SMALL-NEXT:    lbz 3, 0(3)
; SMALL-NEXT:    lwz 0, 20(1)
; SMALL-NEXT:    lwz 30, 8(1)
; SMALL-NEXT:    addi 1, 1, 16
; SMALL-NEXT:    mtlr 0
; SMALL-NEXT:    blr
entry:
  %0 = load i8, ptr @val, align 1
  ret i8 %0
}
