; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py

; RUN: llc -mattr=+ipu1 -march=colossus -enable-pipeliner=false < %s | FileCheck %s

define void @MachinePipelinableFuncDisable(i32 %size, i32 %worker, half* noalias nocapture readonly %in, half* noalias nocapture %out) {
; CHECK-LABEL: MachinePipelinableFuncDisable:
; CHECK:         {
; CHECK-NEXT:     rpt $m0, 3
; CHECK-NEXT:     fnop
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     ld64step $a0:1, $m15, $m2+=, 6
; CHECK-NEXT:     fnop
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     nop
; CHECK-NEXT:     f16v2exp $a0, $a0
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     nop
; CHECK-NEXT:     f16v2exp $a1, $a1
; CHECK-NEXT:    }
; CHECK-NEXT:    {
; CHECK-NEXT:     st64step $a0:1, $m15, $m1+=, 6
; CHECK-NEXT:     fnop
; CHECK-NEXT:    }
entry:
  %cmp = icmp ult i32 %size, 4095
  tail call void @llvm.assume(i1 %cmp)
  %cmp215.not = icmp eq i32 %size, 0
  br i1 %cmp215.not, label %for.cond.cleanup, label %for.body.preheader

for.body.preheader:
  %0 = bitcast half* %out to <4 x half>*
  %add.ptr1 = getelementptr inbounds <4 x half>, <4 x half>* %0, i32 %worker
  %1 = bitcast half* %in to <4 x half>*
  %add.ptr = getelementptr inbounds <4 x half>, <4 x half>* %1, i32 %worker
  br label %for.body

for.cond.cleanup:
  ret void

for.body:
  %h4In.018 = phi <4 x half>* [ %add.ptr3, %for.body ], [ %add.ptr, %for.body.preheader ]
  %h4Out.017 = phi <4 x half>* [ %add.ptr4, %for.body ], [ %add.ptr1, %for.body.preheader ]
  %i.016 = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
  %2 = load <4 x half>, <4 x half>* %h4In.018, align 8
  %add.ptr3 = getelementptr inbounds <4 x half>, <4 x half>* %h4In.018, i32 6
  %call.i = tail call <4 x half> @llvm.exp.v4f16(<4 x half> %2)
  store <4 x half> %call.i, <4 x half>* %h4Out.017, align 8
  %add.ptr4 = getelementptr inbounds <4 x half>, <4 x half>* %h4Out.017, i32 6
  %inc = add nuw i32 %i.016, 1
  %exitcond.not = icmp eq i32 %inc, %size
  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !5
}

declare void @llvm.assume(i1 noundef)

declare <4 x half> @llvm.exp.v4f16(<4 x half>)

!5 = distinct !{!5, !6, !7}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!"llvm.loop.pipeline.disable", i1 true}
