; LLVM IR from ermig1979/Simd :: src/Simd (SimdBaseSynetMergedConvolution32f)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.Simd::SynetMergedConvolution32f" = type { %"struct.Simd::Deletable", %"struct.Simd::MergConvParam", %"struct.Simd::Array", %"class.std::__cxx11::basic_string" }
%"struct.Simd::Deletable" = type { ptr }
%"struct.Simd::MergConvParam" = type <{ [3 x %"struct.Simd::ConvParam"], i64, i32, [4 x i8] }>
%"struct.Simd::ConvParam" = type <{ %struct.SimdConvolutionParameters, i32, [4 x i8], i64, i32, [4 x i8] }>
%struct.SimdConvolutionParameters = type { i64, i64, i64, i32, i32, i64, i64, i64, i32, i32, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i32 }
%"struct.Simd::Array" = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.Simd::Base::SynetMergedConvolution32f" = type { %"class.Simd::SynetMergedConvolution32f", [4 x ptr], i64, i64, [2 x i64], [3 x %"struct.Simd::Array"], [3 x %"struct.Simd::Array"], [3 x %"struct.Simd::Array"], [3 x ptr], [3 x ptr], [3 x ptr], i64, i64, [2 x i64], [2 x i64], [2 x i64], [3 x i64] }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK4Simd4Base27SynetMergedConvolution32fCd19ReorderSecondWeightEPKfPf(ptr noundef nonnull align 8 dereferenceable(992) %0, ptr noundef %1, ptr noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %17 = getelementptr inbounds %"class.Simd::SynetMergedConvolution32f", ptr %16, i32 0, i32 1
  %18 = getelementptr inbounds %"struct.Simd::MergConvParam", ptr %17, i32 0, i32 0
  %19 = getelementptr inbounds [3 x %"struct.Simd::ConvParam"], ptr %18, i64 0, i64 1
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %20, i32 0, i32 5
  %22 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %22, ptr %8, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %23, i32 0, i32 10
  %25 = load i64, ptr %24, align 8, !tbaa !16
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %26, i32 0, i32 11
  %28 = load i64, ptr %27, align 8, !tbaa !17
  %29 = mul i64 %25, %28
  store i64 %29, ptr %9, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %30 = getelementptr inbounds %"class.Simd::Base::SynetMergedConvolution32f", ptr %16, i32 0, i32 11
  %31 = load i64, ptr %30, align 8, !tbaa !18
  store i64 %31, ptr %10, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !15
  br label %32

32:                                               ; preds = %90, %3
  %33 = load i64, ptr %11, align 8, !tbaa !15
  %34 = load i64, ptr %8, align 8, !tbaa !15
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %94

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %38 = load i64, ptr %10, align 8, !tbaa !15
  %39 = load i64, ptr %8, align 8, !tbaa !15
  %40 = load i64, ptr %11, align 8, !tbaa !15
  %41 = sub i64 %39, %40
  %42 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %38, i64 noundef %41)
  store i64 %42, ptr %13, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store i64 0, ptr %14, align 8, !tbaa !15
  br label %43

43:                                               ; preds = %86, %37
  %44 = load i64, ptr %14, align 8, !tbaa !15
  %45 = load i64, ptr %9, align 8, !tbaa !15
  %46 = icmp ult i64 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %89

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !15
  br label %49

49:                                               ; preds = %67, %48
  %50 = load i64, ptr %15, align 8, !tbaa !15
  %51 = load i64, ptr %13, align 8, !tbaa !15
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %53, label %70

53:                                               ; preds = %49
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i64, ptr %14, align 8, !tbaa !15
  %56 = load i64, ptr %8, align 8, !tbaa !15
  %57 = mul i64 %55, %56
  %58 = load i64, ptr %11, align 8, !tbaa !15
  %59 = add i64 %57, %58
  %60 = load i64, ptr %15, align 8, !tbaa !15
  %61 = add i64 %59, %60
  %62 = getelementptr inbounds float, ptr %54, i64 %61
  %63 = load float, ptr %62, align 4, !tbaa !27
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = load i64, ptr %15, align 8, !tbaa !15
  %66 = getelementptr inbounds float, ptr %64, i64 %65
  store float %63, ptr %66, align 4, !tbaa !27
  br label %67

67:                                               ; preds = %53
  %68 = load i64, ptr %15, align 8, !tbaa !15
  %69 = add i64 %68, 1
  store i64 %69, ptr %15, align 8, !tbaa !15
  br label %49, !llvm.loop !29

70:                                               ; preds = %49
  br label %71

71:                                               ; preds = %79, %70
  %72 = load i64, ptr %15, align 8, !tbaa !15
  %73 = load i64, ptr %10, align 8, !tbaa !15
  %74 = icmp ult i64 %72, %73
  br i1 %74, label %75, label %82

75:                                               ; preds = %71
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load i64, ptr %15, align 8, !tbaa !15
  %78 = getelementptr inbounds float, ptr %76, i64 %77
  store float 0.000000e+00, ptr %78, align 4, !tbaa !27
  br label %79

79:                                               ; preds = %75
  %80 = load i64, ptr %15, align 8, !tbaa !15
  %81 = add i64 %80, 1
  store i64 %81, ptr %15, align 8, !tbaa !15
  br label %71, !llvm.loop !31

82:                                               ; preds = %71
  %83 = load i64, ptr %10, align 8, !tbaa !15
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds float, ptr %84, i64 %83
  store ptr %85, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %86

86:                                               ; preds = %82
  %87 = load i64, ptr %14, align 8, !tbaa !15
  %88 = add i64 %87, 1
  store i64 %88, ptr %14, align 8, !tbaa !15
  br label %43, !llvm.loop !32

89:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %10, align 8, !tbaa !15
  %92 = load i64, ptr %11, align 8, !tbaa !15
  %93 = add i64 %92, %91
  store i64 %93, ptr %11, align 8, !tbaa !15
  br label %32, !llvm.loop !33

94:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 32}
!10 = !{!"_ZTS25SimdConvolutionParameters", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !13, i64 28, !11, i64 32, !11, i64 40, !11, i64 48, !12, i64 56, !13, i64 60, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !14, i64 152}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTS18SimdTensorDataType", !7, i64 0}
!13 = !{!"_ZTS20SimdTensorFormatType", !7, i64 0}
!14 = !{!"_ZTS29SimdConvolutionActivationType", !7, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!10, !11, i64 64}
!17 = !{!10, !11, i64 72}
!18 = !{!19, !11, i64 904}
!19 = !{!"_ZTSN4Simd4Base25SynetMergedConvolution32fE", !20, i64 0, !7, i64 624, !11, i64 656, !11, i64 664, !7, i64 672, !7, i64 688, !7, i64 736, !7, i64 784, !7, i64 832, !7, i64 856, !7, i64 880, !11, i64 904, !11, i64 912, !7, i64 920, !7, i64 936, !7, i64 952, !7, i64 968}
!20 = !{!"_ZTSN4Simd25SynetMergedConvolution32fE", !21, i64 0, !22, i64 8, !24, i64 576, !25, i64 592}
!21 = !{!"_ZTSN4Simd9DeletableE"}
!22 = !{!"_ZTSN4Simd13MergConvParamE", !7, i64 0, !11, i64 552, !23, i64 560}
!23 = !{!"_ZTS8SimdBool", !7, i64 0}
!24 = !{!"_ZTSN4Simd5ArrayIfEE", !6, i64 0, !11, i64 8}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !11, i64 8, !7, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"float", !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZNK4Simd4Base27SynetMergedConvolution32fCd19ReorderSecondWeightEPKfPf(ptr nocapture noundef nonnull readonly align 8 dereferenceable(992) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2) unnamed_addr #1 align 2 {
  %4 = ptrtoint ptr %1 to i64
  %5 = ptrtoint ptr %2 to i64
  %6 = getelementptr inbounds i8, ptr %0, i64 224
  %7 = load i64, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 256
  %9 = load i64, ptr %8, align 8, !tbaa !13
  %10 = getelementptr inbounds i8, ptr %0, i64 264
  %11 = load i64, ptr %10, align 8, !tbaa !14
  %12 = mul i64 %11, %9
  %.fr63 = freeze i64 %12
  %13 = getelementptr inbounds i8, ptr %0, i64 904
  %14 = load i64, ptr %13, align 8, !tbaa !15
  %.fr = freeze i64 %14
  %.not = icmp eq i64 %7, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %.not64 = icmp eq i64 %.fr63, 0
  br i1 %.not64, label %.lr.ph.split, label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %.not65 = icmp eq i64 %.fr, 0
  br i1 %.not65, label %.preheader36.lr.ph.us.preheader, label %.preheader36.lr.ph.us.us.preheader

.preheader36.lr.ph.us.preheader:                  ; preds = %.lr.ph.split.us
  %15 = sub i64 %5, %4
  %16 = mul i64 %7, -4
  br label %.preheader36.lr.ph.us

.preheader36.lr.ph.us.us.preheader:               ; preds = %.lr.ph.split.us
  %17 = shl i64 %.fr, 2
  %18 = mul i64 %.fr, %.fr63
  %19 = shl i64 %18, 2
  %20 = add i64 %.fr63, -1
  %21 = mul i64 %.fr, %20
  %22 = shl i64 %21, 2
  %23 = shl i64 %.fr, 2
  %24 = mul i64 %7, %20
  %25 = shl i64 %24, 2
  %26 = getelementptr i8, ptr %1, i64 %25
  %stride.check = icmp slt i64 %17, 0
  %.mask = and i64 %7, 2305843009213693952
  %stride.check91 = icmp ne i64 %.mask, 0
  br label %.preheader36.lr.ph.us.us

.preheader36.lr.ph.us.us:                         ; preds = %.preheader36.lr.ph.us.us.preheader, %._crit_edge42.us.us
  %indvar = phi i64 [ 0, %.preheader36.lr.ph.us.us.preheader ], [ %indvar.next, %._crit_edge42.us.us ]
  %.03153.us.us = phi ptr [ %2, %.preheader36.lr.ph.us.us.preheader ], [ %.us-phi.us.us, %._crit_edge42.us.us ]
  %.03352.us.us = phi i64 [ 0, %.preheader36.lr.ph.us.us.preheader ], [ %35, %._crit_edge42.us.us ]
  %27 = mul i64 %23, %indvar
  %scevgep88 = getelementptr i8, ptr %1, i64 %27
  %28 = sub i64 %7, %.03352.us.us
  %29 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %.fr, i64 noundef %28)
  %invariant.gep.us.us = getelementptr float, ptr %1, i64 %.03352.us.us
  %.not67 = icmp eq i64 %29, 0
  br i1 %.not67, label %.preheader36.us44.us.us.preheader, label %.preheader36.us.us.us.preheader

.preheader36.us.us.us.preheader:                  ; preds = %.preheader36.lr.ph.us.us
  %scevgep89 = getelementptr i8, ptr %26, i64 %27
  %30 = shl i64 %29, 2
  %31 = sub i64 %17, %30
  %32 = icmp ult i64 %29, %.fr
  %scevgep86 = getelementptr i8, ptr %.03153.us.us, i64 %22
  %scevgep87 = getelementptr i8, ptr %scevgep86, i64 %30
  %scevgep90 = getelementptr i8, ptr %scevgep89, i64 %30
  %min.iters.check = icmp ult i64 %29, 8
  %bound0 = icmp ult ptr %.03153.us.us, %scevgep90
  %bound1 = icmp ult ptr %scevgep88, %scevgep87
  %found.conflict = and i1 %bound0, %bound1
  %33 = or i1 %found.conflict, %stride.check
  %34 = or i1 %33, %stride.check91
  %n.vec = and i64 %29, -8
  %cmp.n = icmp eq i64 %29, %n.vec
  %xtraiter = and i64 %29, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader36.us.us.us

.preheader36.us44.us.us.preheader:                ; preds = %.preheader36.lr.ph.us.us
  tail call void @llvm.memset.p0.i64(ptr align 4 %.03153.us.us, i8 0, i64 %19, i1 false), !tbaa !25
  %scevgep78 = getelementptr i8, ptr %.03153.us.us, i64 %19
  br label %._crit_edge42.us.us

._crit_edge42.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader36.us44.us.us.preheader
  %.us-phi.us.us = phi ptr [ %scevgep78, %.preheader36.us44.us.us.preheader ], [ %51, %._crit_edge.us.us.us ]
  %35 = add i64 %.03352.us.us, %.fr
  %36 = icmp ult i64 %35, %7
  %indvar.next = add i64 %indvar, 1
  br i1 %36, label %.preheader36.lr.ph.us.us, label %._crit_edge, !llvm.loop !27

.preheader36.us.us.us:                            ; preds = %.preheader36.us.us.us.preheader, %._crit_edge.us.us.us
  %.03041.us.us.us = phi i64 [ %52, %._crit_edge.us.us.us ], [ 0, %.preheader36.us.us.us.preheader ]
  %.13240.us.us.us = phi ptr [ %51, %._crit_edge.us.us.us ], [ %.03153.us.us, %.preheader36.us.us.us.preheader ]
  %37 = mul i64 %17, %.03041.us.us.us
  %38 = add i64 %30, %37
  %scevgep = getelementptr i8, ptr %.03153.us.us, i64 %38
  %39 = mul i64 %.03041.us.us.us, %7
  %gep.us.us.us = getelementptr float, ptr %invariant.gep.us.us, i64 %39
  %brmerge = select i1 %min.iters.check, i1 true, i1 %34
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %.preheader36.us.us.us, %middle.block
  %.037.us.us.us.ph = phi i64 [ 0, %.preheader36.us.us.us ], [ %n.vec, %middle.block ]
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %.037.us.us.us.prol = phi i64 [ %43, %scalar.ph.prol ], [ %.037.us.us.us.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %40 = getelementptr float, ptr %gep.us.us.us, i64 %.037.us.us.us.prol
  %41 = load float, ptr %40, align 4, !tbaa !25
  %42 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %.037.us.us.us.prol
  store float %41, ptr %42, align 4, !tbaa !25
  %43 = add nuw i64 %.037.us.us.us.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !29

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.037.us.us.us.unr = phi i64 [ %.037.us.us.us.ph, %scalar.ph.preheader ], [ %43, %scalar.ph.prol ]
  %44 = sub i64 %.037.us.us.us.ph, %29
  %45 = icmp ugt i64 %44, -4
  br i1 %45, label %..preheader_crit_edge.us.us.us, label %scalar.ph

vector.body:                                      ; preds = %.preheader36.us.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader36.us.us.us ]
  %46 = getelementptr float, ptr %gep.us.us.us, i64 %index
  %47 = getelementptr i8, ptr %46, i64 16
  %wide.load = load <4 x float>, ptr %46, align 4, !tbaa !25, !alias.scope !31
  %wide.load92 = load <4 x float>, ptr %47, align 4, !tbaa !25, !alias.scope !31
  %48 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %index
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  store <4 x float> %wide.load, ptr %48, align 4, !tbaa !25, !alias.scope !34, !noalias !31
  store <4 x float> %wide.load92, ptr %49, align 4, !tbaa !25, !alias.scope !34, !noalias !31
  %index.next = add nuw i64 %index, 8
  %50 = icmp eq i64 %index.next, %n.vec
  br i1 %50, label %middle.block, label %vector.body, !llvm.loop !36

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %..preheader_crit_edge.us.us.us, label %scalar.ph.preheader

._crit_edge.us.us.us:                             ; preds = %.lr.ph39.us.us.us.preheader, %..preheader_crit_edge.us.us.us
  %51 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %.fr
  %52 = add nuw i64 %.03041.us.us.us, 1
  %exitcond77.not = icmp eq i64 %52, %.fr63
  br i1 %exitcond77.not, label %._crit_edge42.us.us, label %.preheader36.us.us.us, !llvm.loop !39

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.037.us.us.us = phi i64 [ %68, %scalar.ph ], [ %.037.us.us.us.unr, %scalar.ph.prol.loopexit ]
  %53 = getelementptr float, ptr %gep.us.us.us, i64 %.037.us.us.us
  %54 = load float, ptr %53, align 4, !tbaa !25
  %55 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %.037.us.us.us
  store float %54, ptr %55, align 4, !tbaa !25
  %56 = add nuw i64 %.037.us.us.us, 1
  %57 = getelementptr float, ptr %gep.us.us.us, i64 %56
  %58 = load float, ptr %57, align 4, !tbaa !25
  %59 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %56
  store float %58, ptr %59, align 4, !tbaa !25
  %60 = add nuw i64 %.037.us.us.us, 2
  %61 = getelementptr float, ptr %gep.us.us.us, i64 %60
  %62 = load float, ptr %61, align 4, !tbaa !25
  %63 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %60
  store float %62, ptr %63, align 4, !tbaa !25
  %64 = add nuw i64 %.037.us.us.us, 3
  %65 = getelementptr float, ptr %gep.us.us.us, i64 %64
  %66 = load float, ptr %65, align 4, !tbaa !25
  %67 = getelementptr inbounds float, ptr %.13240.us.us.us, i64 %64
  store float %66, ptr %67, align 4, !tbaa !25
  %68 = add nuw i64 %.037.us.us.us, 4
  %exitcond.not.3 = icmp eq i64 %68, %29
  br i1 %exitcond.not.3, label %..preheader_crit_edge.us.us.us, label %scalar.ph, !llvm.loop !40

..preheader_crit_edge.us.us.us:                   ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  br i1 %32, label %.lr.ph39.us.us.us.preheader, label %._crit_edge.us.us.us

.lr.ph39.us.us.us.preheader:                      ; preds = %..preheader_crit_edge.us.us.us
  tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %31, i1 false), !tbaa !25
  br label %._crit_edge.us.us.us

.preheader36.lr.ph.us:                            ; preds = %.preheader36.lr.ph.us.backedge, %.preheader36.lr.ph.us.preheader
  %69 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef 0, i64 noundef %7)
  %.not66 = icmp eq i64 %69, 0
  br i1 %.not66, label %.preheader36.lr.ph.us.backedge, label %.preheader36.us.us.preheader

.preheader36.lr.ph.us.backedge:                   ; preds = %._crit_edge.us.us, %.preheader36.lr.ph.us
  br label %.preheader36.lr.ph.us

.preheader36.us.us.preheader:                     ; preds = %.preheader36.lr.ph.us
  %min.iters.check96 = icmp ult i64 %69, 8
  %n.vec99 = and i64 %69, -8
  %cmp.n106 = icmp eq i64 %69, %n.vec99
  %xtraiter108 = and i64 %69, 3
  %lcmp.mod109.not = icmp eq i64 %xtraiter108, 0
  br label %.preheader36.us.us

.preheader36.us.us:                               ; preds = %.preheader36.us.us.preheader, %._crit_edge.us.us
  %.03041.us.us = phi i64 [ %84, %._crit_edge.us.us ], [ 0, %.preheader36.us.us.preheader ]
  %70 = mul i64 %.03041.us.us, %7
  %gep.us.us = getelementptr float, ptr %1, i64 %70
  br i1 %min.iters.check96, label %scalar.ph95.preheader, label %vector.memcheck93

scalar.ph95.preheader:                            ; preds = %middle.block94, %vector.memcheck93, %.preheader36.us.us
  %.037.us.us.ph = phi i64 [ 0, %vector.memcheck93 ], [ 0, %.preheader36.us.us ], [ %n.vec99, %middle.block94 ]
  br i1 %lcmp.mod109.not, label %scalar.ph95.prol.loopexit, label %scalar.ph95.prol

scalar.ph95.prol:                                 ; preds = %scalar.ph95.preheader, %scalar.ph95.prol
  %.037.us.us.prol = phi i64 [ %74, %scalar.ph95.prol ], [ %.037.us.us.ph, %scalar.ph95.preheader ]
  %prol.iter110 = phi i64 [ %prol.iter110.next, %scalar.ph95.prol ], [ 0, %scalar.ph95.preheader ]
  %71 = getelementptr float, ptr %gep.us.us, i64 %.037.us.us.prol
  %72 = load float, ptr %71, align 4, !tbaa !25
  %73 = getelementptr inbounds float, ptr %2, i64 %.037.us.us.prol
  store float %72, ptr %73, align 4, !tbaa !25
  %74 = add nuw i64 %.037.us.us.prol, 1
  %prol.iter110.next = add i64 %prol.iter110, 1
  %prol.iter110.cmp.not = icmp eq i64 %prol.iter110.next, %xtraiter108
  br i1 %prol.iter110.cmp.not, label %scalar.ph95.prol.loopexit, label %scalar.ph95.prol, !llvm.loop !41

scalar.ph95.prol.loopexit:                        ; preds = %scalar.ph95.prol, %scalar.ph95.preheader
  %.037.us.us.unr = phi i64 [ %.037.us.us.ph, %scalar.ph95.preheader ], [ %74, %scalar.ph95.prol ]
  %75 = sub i64 %.037.us.us.ph, %69
  %76 = icmp ugt i64 %75, -4
  br i1 %76, label %._crit_edge.us.us, label %scalar.ph95

vector.memcheck93:                                ; preds = %.preheader36.us.us
  %77 = mul i64 %16, %.03041.us.us
  %78 = add i64 %15, %77
  %diff.check = icmp ult i64 %78, 32
  br i1 %diff.check, label %scalar.ph95.preheader, label %vector.body101

vector.body101:                                   ; preds = %vector.memcheck93, %vector.body101
  %index102 = phi i64 [ %index.next105, %vector.body101 ], [ 0, %vector.memcheck93 ]
  %79 = getelementptr float, ptr %gep.us.us, i64 %index102
  %80 = getelementptr i8, ptr %79, i64 16
  %wide.load103 = load <4 x float>, ptr %79, align 4, !tbaa !25
  %wide.load104 = load <4 x float>, ptr %80, align 4, !tbaa !25
  %81 = getelementptr inbounds float, ptr %2, i64 %index102
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  store <4 x float> %wide.load103, ptr %81, align 4, !tbaa !25
  store <4 x float> %wide.load104, ptr %82, align 4, !tbaa !25
  %index.next105 = add nuw i64 %index102, 8
  %83 = icmp eq i64 %index.next105, %n.vec99
  br i1 %83, label %middle.block94, label %vector.body101, !llvm.loop !42

middle.block94:                                   ; preds = %vector.body101
  br i1 %cmp.n106, label %._crit_edge.us.us, label %scalar.ph95.preheader

._crit_edge.us.us:                                ; preds = %scalar.ph95.prol.loopexit, %scalar.ph95, %middle.block94
  %84 = add nuw i64 %.03041.us.us, 1
  %exitcond82.not = icmp eq i64 %84, %.fr63
  br i1 %exitcond82.not, label %.preheader36.lr.ph.us.backedge, label %.preheader36.us.us, !llvm.loop !39

scalar.ph95:                                      ; preds = %scalar.ph95.prol.loopexit, %scalar.ph95
  %.037.us.us = phi i64 [ %100, %scalar.ph95 ], [ %.037.us.us.unr, %scalar.ph95.prol.loopexit ]
  %85 = getelementptr float, ptr %gep.us.us, i64 %.037.us.us
  %86 = load float, ptr %85, align 4, !tbaa !25
  %87 = getelementptr inbounds float, ptr %2, i64 %.037.us.us
  store float %86, ptr %87, align 4, !tbaa !25
  %88 = add nuw i64 %.037.us.us, 1
  %89 = getelementptr float, ptr %gep.us.us, i64 %88
  %90 = load float, ptr %89, align 4, !tbaa !25
  %91 = getelementptr inbounds float, ptr %2, i64 %88
  store float %90, ptr %91, align 4, !tbaa !25
  %92 = add nuw i64 %.037.us.us, 2
  %93 = getelementptr float, ptr %gep.us.us, i64 %92
  %94 = load float, ptr %93, align 4, !tbaa !25
  %95 = getelementptr inbounds float, ptr %2, i64 %92
  store float %94, ptr %95, align 4, !tbaa !25
  %96 = add nuw i64 %.037.us.us, 3
  %97 = getelementptr float, ptr %gep.us.us, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !25
  %99 = getelementptr inbounds float, ptr %2, i64 %96
  store float %98, ptr %99, align 4, !tbaa !25
  %100 = add nuw i64 %.037.us.us, 4
  %exitcond80.not.3 = icmp eq i64 %100, %69
  br i1 %exitcond80.not.3, label %._crit_edge.us.us, label %scalar.ph95, !llvm.loop !43

._crit_edge:                                      ; preds = %._crit_edge42.us.us, %.lr.ph.split, %3
  ret void

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.03352 = phi i64 [ %103, %.lr.ph.split ], [ 0, %.lr.ph ]
  %101 = sub i64 %7, %.03352
  %102 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %.fr, i64 noundef %101)
  %103 = add i64 %.03352, %.fr
  %104 = icmp ult i64 %103, %7
  br i1 %104, label %.lr.ph.split, label %._crit_edge, !llvm.loop !27
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

attributes #0 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 32}
!6 = !{!"_ZTS25SimdConvolutionParameters", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !11, i64 60, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !12, i64 152}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS18SimdTensorDataType", !8, i64 0}
!11 = !{!"_ZTS20SimdTensorFormatType", !8, i64 0}
!12 = !{!"_ZTS29SimdConvolutionActivationType", !8, i64 0}
!13 = !{!6, !7, i64 64}
!14 = !{!6, !7, i64 72}
!15 = !{!16, !7, i64 904}
!16 = !{!"_ZTSN4Simd4Base25SynetMergedConvolution32fE", !17, i64 0, !8, i64 624, !7, i64 656, !7, i64 664, !8, i64 672, !8, i64 688, !8, i64 736, !8, i64 784, !8, i64 832, !8, i64 856, !8, i64 880, !7, i64 904, !7, i64 912, !8, i64 920, !8, i64 936, !8, i64 952, !8, i64 968}
!17 = !{!"_ZTSN4Simd25SynetMergedConvolution32fE", !18, i64 0, !19, i64 8, !21, i64 576, !23, i64 592}
!18 = !{!"_ZTSN4Simd9DeletableE"}
!19 = !{!"_ZTSN4Simd13MergConvParamE", !8, i64 0, !7, i64 552, !20, i64 560}
!20 = !{!"_ZTS8SimdBool", !8, i64 0}
!21 = !{!"_ZTSN4Simd5ArrayIfEE", !22, i64 0, !7, i64 8}
!22 = !{!"any pointer", !8, i64 0}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !7, i64 8, !8, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !22, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"float", !8, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.unroll.disable"}
!31 = !{!32}
!32 = distinct !{!32, !33}
!33 = distinct !{!33, !"LVerDomain"}
!34 = !{!35}
!35 = distinct !{!35, !33}
!36 = distinct !{!36, !28, !37, !38}
!37 = !{!"llvm.loop.isvectorized", i32 1}
!38 = !{!"llvm.loop.unroll.runtime.disable"}
!39 = distinct !{!39, !28}
!40 = distinct !{!40, !28, !37}
!41 = distinct !{!41, !30}
!42 = distinct !{!42, !28, !37, !38}
!43 = distinct !{!43, !28, !37}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass