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
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -loop-unroll -unroll-peel-count=1 < %s | FileCheck %s

declare zeroext i8 @patatino()

define fastcc void @tinky() {
; CHECK-LABEL: @tinky(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    br label [[NEXT:%.*]]
; CHECK:       loopexit:
; CHECK-NEXT:    ret void
; CHECK:       next:
; CHECK-NEXT:    br label [[LOOP_PEEL_BEGIN:%.*]]
; CHECK:       loop.peel.begin:
; CHECK-NEXT:    br label [[LOOP_PEEL:%.*]]
; CHECK:       loop.peel:
; CHECK-NEXT:    [[CALL593_PEEL:%.*]] = tail call zeroext i8 @patatino()
; CHECK-NEXT:    br i1 false, label [[LOOP_PEEL_NEXT:%.*]], label [[LOOPEXIT:%.*]]
; CHECK:       loop.peel.next:
; CHECK-NEXT:    br label [[LOOP_PEEL_NEXT1:%.*]]
; CHECK:       loop.peel.next1:
; CHECK-NEXT:    br label [[NEXT_PEEL_NEWPH:%.*]]
; CHECK:       next.peel.newph:
; CHECK-NEXT:    br label [[LOOP:%.*]]
; CHECK:       loop:
; CHECK-NEXT:    [[CALL593:%.*]] = tail call zeroext i8 @patatino()
; CHECK-NEXT:    br label [[LOOPEXIT]]
;
entry:
  br label %next

loopexit:
  ret void

next:
  br label %loop

loop:
  %a = phi i8 [ undef, %next ], [ %call593, %loop ]
  %b = phi i32 [ 0, %next ], [ 1, %loop ]
  %call593 = tail call zeroext i8 @patatino()
  br i1 false, label %loop, label %loopexit
}