; 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 @_ZNK4Simd4Base27SynetMergedConvolution32fCd18ReorderFirstWeightEPKfPf(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 0
  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 10
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %23, i32 0, i32 11
  %25 = load i64, ptr %24, align 8, !tbaa !15
  %26 = mul i64 %22, %25
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %27, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !16
  %30 = mul i64 %26, %29
  store i64 %30, ptr %8, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.SimdConvolutionParameters, ptr %31, i32 0, i32 5
  %33 = load i64, ptr %32, align 8, !tbaa !18
  store i64 %33, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %34 = getelementptr inbounds %"class.Simd::Base::SynetMergedConvolution32f", ptr %16, i32 0, i32 11
  %35 = load i64, ptr %34, align 8, !tbaa !19
  %36 = mul i64 %35, 2
  store i64 %36, ptr %10, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !17
  br label %37

37:                                               ; preds = %95, %3
  %38 = load i64, ptr %11, align 8, !tbaa !17
  %39 = load i64, ptr %9, align 8, !tbaa !17
  %40 = icmp ult i64 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %43 = load i64, ptr %10, align 8, !tbaa !17
  %44 = load i64, ptr %9, align 8, !tbaa !17
  %45 = load i64, ptr %11, align 8, !tbaa !17
  %46 = sub i64 %44, %45
  %47 = call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %43, i64 noundef %46)
  store i64 %47, ptr %13, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store i64 0, ptr %14, align 8, !tbaa !17
  br label %48

48:                                               ; preds = %91, %42
  %49 = load i64, ptr %14, align 8, !tbaa !17
  %50 = load i64, ptr %8, align 8, !tbaa !17
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %53, label %52

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

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

54:                                               ; preds = %72, %53
  %55 = load i64, ptr %15, align 8, !tbaa !17
  %56 = load i64, ptr %13, align 8, !tbaa !17
  %57 = icmp ult i64 %55, %56
  br i1 %57, label %58, label %75

58:                                               ; preds = %54
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load i64, ptr %14, align 8, !tbaa !17
  %61 = load i64, ptr %9, align 8, !tbaa !17
  %62 = mul i64 %60, %61
  %63 = load i64, ptr %11, align 8, !tbaa !17
  %64 = add i64 %62, %63
  %65 = load i64, ptr %15, align 8, !tbaa !17
  %66 = add i64 %64, %65
  %67 = getelementptr inbounds float, ptr %59, i64 %66
  %68 = load float, ptr %67, align 4, !tbaa !28
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load i64, ptr %15, align 8, !tbaa !17
  %71 = getelementptr inbounds float, ptr %69, i64 %70
  store float %68, ptr %71, align 4, !tbaa !28
  br label %72

72:                                               ; preds = %58
  %73 = load i64, ptr %15, align 8, !tbaa !17
  %74 = add i64 %73, 1
  store i64 %74, ptr %15, align 8, !tbaa !17
  br label %54, !llvm.loop !30

75:                                               ; preds = %54
  br label %76

76:                                               ; preds = %84, %75
  %77 = load i64, ptr %15, align 8, !tbaa !17
  %78 = load i64, ptr %10, align 8, !tbaa !17
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %80, label %87

80:                                               ; preds = %76
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i64, ptr %15, align 8, !tbaa !17
  %83 = getelementptr inbounds float, ptr %81, i64 %82
  store float 0.000000e+00, ptr %83, align 4, !tbaa !28
  br label %84

84:                                               ; preds = %80
  %85 = load i64, ptr %15, align 8, !tbaa !17
  %86 = add i64 %85, 1
  store i64 %86, ptr %15, align 8, !tbaa !17
  br label %76, !llvm.loop !32

87:                                               ; preds = %76
  %88 = load i64, ptr %10, align 8, !tbaa !17
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds float, ptr %89, i64 %88
  store ptr %90, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %91

91:                                               ; preds = %87
  %92 = load i64, ptr %14, align 8, !tbaa !17
  %93 = add i64 %92, 1
  store i64 %93, ptr %14, align 8, !tbaa !17
  br label %48, !llvm.loop !33

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

95:                                               ; preds = %94
  %96 = load i64, ptr %10, align 8, !tbaa !17
  %97 = load i64, ptr %11, align 8, !tbaa !17
  %98 = add i64 %97, %96
  store i64 %98, ptr %11, align 8, !tbaa !17
  br label %37, !llvm.loop !34

99:                                               ; preds = %41
  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 64}
!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 = !{!10, !11, i64 72}
!16 = !{!10, !11, i64 0}
!17 = !{!11, !11, i64 0}
!18 = !{!10, !11, i64 32}
!19 = !{!20, !11, i64 904}
!20 = !{!"_ZTSN4Simd4Base25SynetMergedConvolution32fE", !21, 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}
!21 = !{!"_ZTSN4Simd25SynetMergedConvolution32fE", !22, i64 0, !23, i64 8, !25, i64 576, !26, i64 592}
!22 = !{!"_ZTSN4Simd9DeletableE"}
!23 = !{!"_ZTSN4Simd13MergConvParamE", !7, i64 0, !11, i64 552, !24, i64 560}
!24 = !{!"_ZTS8SimdBool", !7, i64 0}
!25 = !{!"_ZTSN4Simd5ArrayIfEE", !6, i64 0, !11, i64 8}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !11, i64 8, !7, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = distinct !{!32, !31}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}


; 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 @_ZNK4Simd4Base27SynetMergedConvolution32fCd18ReorderFirstWeightEPKfPf(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 8
  %7 = getelementptr inbounds i8, ptr %0, i64 72
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = load i64, ptr %9, align 8, !tbaa !13
  %11 = mul i64 %10, %8
  %12 = load i64, ptr %6, align 8, !tbaa !14
  %13 = mul i64 %11, %12
  %.fr64 = freeze i64 %13
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = load i64, ptr %14, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %0, i64 904
  %17 = load i64, ptr %16, align 8, !tbaa !16
  %.fr66 = freeze i64 %17
  %18 = shl i64 %.fr66, 1
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

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

.lr.ph.split.us:                                  ; preds = %.lr.ph
  %.not67 = icmp eq i64 %18, 0
  br i1 %.not67, label %.preheader37.lr.ph.us.preheader, label %.preheader37.lr.ph.us.us.preheader

.preheader37.lr.ph.us.preheader:                  ; preds = %.lr.ph.split.us
  %19 = sub i64 %5, %4
  %20 = mul i64 %15, -4
  br label %.preheader37.lr.ph.us

.preheader37.lr.ph.us.us.preheader:               ; preds = %.lr.ph.split.us
  %21 = shl i64 %.fr66, 3
  %22 = mul i64 %.fr66, %.fr64
  %23 = shl i64 %22, 3
  %24 = add i64 %.fr64, -1
  %25 = mul i64 %.fr66, %24
  %26 = shl i64 %25, 3
  %27 = shl i64 %.fr66, 3
  %28 = mul i64 %15, %24
  %29 = shl i64 %28, 2
  %30 = getelementptr i8, ptr %1, i64 %29
  %stride.check = icmp slt i64 %21, 0
  %.mask = and i64 %15, 2305843009213693952
  %stride.check93 = icmp ne i64 %.mask, 0
  br label %.preheader37.lr.ph.us.us

.preheader37.lr.ph.us.us:                         ; preds = %.preheader37.lr.ph.us.us.preheader, %._crit_edge43.us.us
  %indvar = phi i64 [ 0, %.preheader37.lr.ph.us.us.preheader ], [ %indvar.next, %._crit_edge43.us.us ]
  %.03254.us.us = phi ptr [ %2, %.preheader37.lr.ph.us.us.preheader ], [ %.us-phi.us.us, %._crit_edge43.us.us ]
  %.03453.us.us = phi i64 [ 0, %.preheader37.lr.ph.us.us.preheader ], [ %39, %._crit_edge43.us.us ]
  %31 = mul i64 %27, %indvar
  %scevgep90 = getelementptr i8, ptr %1, i64 %31
  %32 = sub i64 %15, %.03453.us.us
  %33 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %18, i64 noundef %32)
  %invariant.gep.us.us = getelementptr float, ptr %1, i64 %.03453.us.us
  %.not69 = icmp eq i64 %33, 0
  br i1 %.not69, label %.preheader37.us45.us.us.preheader, label %.preheader37.us.us.us.preheader

.preheader37.us.us.us.preheader:                  ; preds = %.preheader37.lr.ph.us.us
  %scevgep91 = getelementptr i8, ptr %30, i64 %31
  %34 = shl i64 %33, 2
  %35 = sub i64 %21, %34
  %36 = icmp ult i64 %33, %18
  %scevgep88 = getelementptr i8, ptr %.03254.us.us, i64 %26
  %scevgep89 = getelementptr i8, ptr %scevgep88, i64 %34
  %scevgep92 = getelementptr i8, ptr %scevgep91, i64 %34
  %min.iters.check = icmp ult i64 %33, 8
  %bound0 = icmp ult ptr %.03254.us.us, %scevgep92
  %bound1 = icmp ult ptr %scevgep90, %scevgep89
  %found.conflict = and i1 %bound0, %bound1
  %37 = or i1 %found.conflict, %stride.check
  %38 = or i1 %37, %stride.check93
  %n.vec = and i64 %33, -8
  %cmp.n = icmp eq i64 %33, %n.vec
  %xtraiter = and i64 %33, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader37.us.us.us

.preheader37.us45.us.us.preheader:                ; preds = %.preheader37.lr.ph.us.us
  tail call void @llvm.memset.p0.i64(ptr align 4 %.03254.us.us, i8 0, i64 %23, i1 false), !tbaa !26
  %scevgep80 = getelementptr i8, ptr %.03254.us.us, i64 %23
  br label %._crit_edge43.us.us

._crit_edge43.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader37.us45.us.us.preheader
  %.us-phi.us.us = phi ptr [ %scevgep80, %.preheader37.us45.us.us.preheader ], [ %55, %._crit_edge.us.us.us ]
  %39 = add i64 %.03453.us.us, %18
  %40 = icmp ult i64 %39, %15
  %indvar.next = add i64 %indvar, 1
  br i1 %40, label %.preheader37.lr.ph.us.us, label %._crit_edge, !llvm.loop !28

.preheader37.us.us.us:                            ; preds = %.preheader37.us.us.us.preheader, %._crit_edge.us.us.us
  %.03142.us.us.us = phi i64 [ %56, %._crit_edge.us.us.us ], [ 0, %.preheader37.us.us.us.preheader ]
  %.13341.us.us.us = phi ptr [ %55, %._crit_edge.us.us.us ], [ %.03254.us.us, %.preheader37.us.us.us.preheader ]
  %41 = mul i64 %21, %.03142.us.us.us
  %42 = add i64 %34, %41
  %scevgep = getelementptr i8, ptr %.03254.us.us, i64 %42
  %43 = mul i64 %.03142.us.us.us, %15
  %gep.us.us.us = getelementptr float, ptr %invariant.gep.us.us, i64 %43
  %brmerge = select i1 %min.iters.check, i1 true, i1 %38
  br i1 %brmerge, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %.preheader37.us.us.us, %middle.block
  %.038.us.us.us.ph = phi i64 [ 0, %.preheader37.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
  %.038.us.us.us.prol = phi i64 [ %47, %scalar.ph.prol ], [ %.038.us.us.us.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %44 = getelementptr float, ptr %gep.us.us.us, i64 %.038.us.us.us.prol
  %45 = load float, ptr %44, align 4, !tbaa !26
  %46 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %.038.us.us.us.prol
  store float %45, ptr %46, align 4, !tbaa !26
  %47 = add nuw i64 %.038.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 !30

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.038.us.us.us.unr = phi i64 [ %.038.us.us.us.ph, %scalar.ph.preheader ], [ %47, %scalar.ph.prol ]
  %48 = sub i64 %.038.us.us.us.ph, %33
  %49 = icmp ugt i64 %48, -4
  br i1 %49, label %..preheader_crit_edge.us.us.us, label %scalar.ph

vector.body:                                      ; preds = %.preheader37.us.us.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader37.us.us.us ]
  %50 = getelementptr float, ptr %gep.us.us.us, i64 %index
  %51 = getelementptr i8, ptr %50, i64 16
  %wide.load = load <4 x float>, ptr %50, align 4, !tbaa !26, !alias.scope !32
  %wide.load94 = load <4 x float>, ptr %51, align 4, !tbaa !26, !alias.scope !32
  %52 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %index
  %53 = getelementptr inbounds i8, ptr %52, i64 16
  store <4 x float> %wide.load, ptr %52, align 4, !tbaa !26, !alias.scope !35, !noalias !32
  store <4 x float> %wide.load94, ptr %53, align 4, !tbaa !26, !alias.scope !35, !noalias !32
  %index.next = add nuw i64 %index, 8
  %54 = icmp eq i64 %index.next, %n.vec
  br i1 %54, label %middle.block, label %vector.body, !llvm.loop !37

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.ph40.us.us.us.preheader, %..preheader_crit_edge.us.us.us
  %55 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %18
  %56 = add nuw i64 %.03142.us.us.us, 1
  %exitcond79.not = icmp eq i64 %56, %.fr64
  br i1 %exitcond79.not, label %._crit_edge43.us.us, label %.preheader37.us.us.us, !llvm.loop !40

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %.038.us.us.us = phi i64 [ %72, %scalar.ph ], [ %.038.us.us.us.unr, %scalar.ph.prol.loopexit ]
  %57 = getelementptr float, ptr %gep.us.us.us, i64 %.038.us.us.us
  %58 = load float, ptr %57, align 4, !tbaa !26
  %59 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %.038.us.us.us
  store float %58, ptr %59, align 4, !tbaa !26
  %60 = add nuw i64 %.038.us.us.us, 1
  %61 = getelementptr float, ptr %gep.us.us.us, i64 %60
  %62 = load float, ptr %61, align 4, !tbaa !26
  %63 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %60
  store float %62, ptr %63, align 4, !tbaa !26
  %64 = add nuw i64 %.038.us.us.us, 2
  %65 = getelementptr float, ptr %gep.us.us.us, i64 %64
  %66 = load float, ptr %65, align 4, !tbaa !26
  %67 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %64
  store float %66, ptr %67, align 4, !tbaa !26
  %68 = add nuw i64 %.038.us.us.us, 3
  %69 = getelementptr float, ptr %gep.us.us.us, i64 %68
  %70 = load float, ptr %69, align 4, !tbaa !26
  %71 = getelementptr inbounds float, ptr %.13341.us.us.us, i64 %68
  store float %70, ptr %71, align 4, !tbaa !26
  %72 = add nuw i64 %.038.us.us.us, 4
  %exitcond.not.3 = icmp eq i64 %72, %33
  br i1 %exitcond.not.3, label %..preheader_crit_edge.us.us.us, label %scalar.ph, !llvm.loop !41

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

.lr.ph40.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 %35, i1 false), !tbaa !26
  br label %._crit_edge.us.us.us

.preheader37.lr.ph.us:                            ; preds = %.preheader37.lr.ph.us.backedge, %.preheader37.lr.ph.us.preheader
  %73 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef 0, i64 noundef %15)
  %.not68 = icmp eq i64 %73, 0
  br i1 %.not68, label %.preheader37.lr.ph.us.backedge, label %.preheader37.us.us.preheader

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

.preheader37.us.us.preheader:                     ; preds = %.preheader37.lr.ph.us
  %min.iters.check98 = icmp ult i64 %73, 8
  %n.vec101 = and i64 %73, -8
  %cmp.n108 = icmp eq i64 %73, %n.vec101
  %xtraiter110 = and i64 %73, 3
  %lcmp.mod111.not = icmp eq i64 %xtraiter110, 0
  br label %.preheader37.us.us

.preheader37.us.us:                               ; preds = %.preheader37.us.us.preheader, %._crit_edge.us.us
  %.03142.us.us = phi i64 [ %88, %._crit_edge.us.us ], [ 0, %.preheader37.us.us.preheader ]
  %74 = mul i64 %.03142.us.us, %15
  %gep.us.us = getelementptr float, ptr %1, i64 %74
  br i1 %min.iters.check98, label %scalar.ph97.preheader, label %vector.memcheck95

scalar.ph97.preheader:                            ; preds = %middle.block96, %vector.memcheck95, %.preheader37.us.us
  %.038.us.us.ph = phi i64 [ 0, %vector.memcheck95 ], [ 0, %.preheader37.us.us ], [ %n.vec101, %middle.block96 ]
  br i1 %lcmp.mod111.not, label %scalar.ph97.prol.loopexit, label %scalar.ph97.prol

scalar.ph97.prol:                                 ; preds = %scalar.ph97.preheader, %scalar.ph97.prol
  %.038.us.us.prol = phi i64 [ %78, %scalar.ph97.prol ], [ %.038.us.us.ph, %scalar.ph97.preheader ]
  %prol.iter112 = phi i64 [ %prol.iter112.next, %scalar.ph97.prol ], [ 0, %scalar.ph97.preheader ]
  %75 = getelementptr float, ptr %gep.us.us, i64 %.038.us.us.prol
  %76 = load float, ptr %75, align 4, !tbaa !26
  %77 = getelementptr inbounds float, ptr %2, i64 %.038.us.us.prol
  store float %76, ptr %77, align 4, !tbaa !26
  %78 = add nuw i64 %.038.us.us.prol, 1
  %prol.iter112.next = add i64 %prol.iter112, 1
  %prol.iter112.cmp.not = icmp eq i64 %prol.iter112.next, %xtraiter110
  br i1 %prol.iter112.cmp.not, label %scalar.ph97.prol.loopexit, label %scalar.ph97.prol, !llvm.loop !42

scalar.ph97.prol.loopexit:                        ; preds = %scalar.ph97.prol, %scalar.ph97.preheader
  %.038.us.us.unr = phi i64 [ %.038.us.us.ph, %scalar.ph97.preheader ], [ %78, %scalar.ph97.prol ]
  %79 = sub i64 %.038.us.us.ph, %73
  %80 = icmp ugt i64 %79, -4
  br i1 %80, label %._crit_edge.us.us, label %scalar.ph97

vector.memcheck95:                                ; preds = %.preheader37.us.us
  %81 = mul i64 %20, %.03142.us.us
  %82 = add i64 %19, %81
  %diff.check = icmp ult i64 %82, 32
  br i1 %diff.check, label %scalar.ph97.preheader, label %vector.body103

vector.body103:                                   ; preds = %vector.memcheck95, %vector.body103
  %index104 = phi i64 [ %index.next107, %vector.body103 ], [ 0, %vector.memcheck95 ]
  %83 = getelementptr float, ptr %gep.us.us, i64 %index104
  %84 = getelementptr i8, ptr %83, i64 16
  %wide.load105 = load <4 x float>, ptr %83, align 4, !tbaa !26
  %wide.load106 = load <4 x float>, ptr %84, align 4, !tbaa !26
  %85 = getelementptr inbounds float, ptr %2, i64 %index104
  %86 = getelementptr inbounds i8, ptr %85, i64 16
  store <4 x float> %wide.load105, ptr %85, align 4, !tbaa !26
  store <4 x float> %wide.load106, ptr %86, align 4, !tbaa !26
  %index.next107 = add nuw i64 %index104, 8
  %87 = icmp eq i64 %index.next107, %n.vec101
  br i1 %87, label %middle.block96, label %vector.body103, !llvm.loop !43

middle.block96:                                   ; preds = %vector.body103
  br i1 %cmp.n108, label %._crit_edge.us.us, label %scalar.ph97.preheader

._crit_edge.us.us:                                ; preds = %scalar.ph97.prol.loopexit, %scalar.ph97, %middle.block96
  %88 = add nuw i64 %.03142.us.us, 1
  %exitcond84.not = icmp eq i64 %88, %.fr64
  br i1 %exitcond84.not, label %.preheader37.lr.ph.us.backedge, label %.preheader37.us.us, !llvm.loop !40

scalar.ph97:                                      ; preds = %scalar.ph97.prol.loopexit, %scalar.ph97
  %.038.us.us = phi i64 [ %104, %scalar.ph97 ], [ %.038.us.us.unr, %scalar.ph97.prol.loopexit ]
  %89 = getelementptr float, ptr %gep.us.us, i64 %.038.us.us
  %90 = load float, ptr %89, align 4, !tbaa !26
  %91 = getelementptr inbounds float, ptr %2, i64 %.038.us.us
  store float %90, ptr %91, align 4, !tbaa !26
  %92 = add nuw i64 %.038.us.us, 1
  %93 = getelementptr float, ptr %gep.us.us, i64 %92
  %94 = load float, ptr %93, align 4, !tbaa !26
  %95 = getelementptr inbounds float, ptr %2, i64 %92
  store float %94, ptr %95, align 4, !tbaa !26
  %96 = add nuw i64 %.038.us.us, 2
  %97 = getelementptr float, ptr %gep.us.us, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !26
  %99 = getelementptr inbounds float, ptr %2, i64 %96
  store float %98, ptr %99, align 4, !tbaa !26
  %100 = add nuw i64 %.038.us.us, 3
  %101 = getelementptr float, ptr %gep.us.us, i64 %100
  %102 = load float, ptr %101, align 4, !tbaa !26
  %103 = getelementptr inbounds float, ptr %2, i64 %100
  store float %102, ptr %103, align 4, !tbaa !26
  %104 = add nuw i64 %.038.us.us, 4
  %exitcond82.not.3 = icmp eq i64 %104, %73
  br i1 %exitcond82.not.3, label %._crit_edge.us.us, label %scalar.ph97, !llvm.loop !44

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

.lr.ph.split:                                     ; preds = %.lr.ph, %.lr.ph.split
  %.03453 = phi i64 [ %107, %.lr.ph.split ], [ 0, %.lr.ph ]
  %105 = sub i64 %15, %.03453
  %106 = tail call noundef i64 @_ZN4Simd3MinImEET_S1_S1_(i64 noundef %18, i64 noundef %105)
  %107 = add i64 %.03453, %18
  %108 = icmp ult i64 %107, %15
  br i1 %108, label %.lr.ph.split, label %._crit_edge, !llvm.loop !28
}

; 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 64}
!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 72}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !7, i64 32}
!16 = !{!17, !7, i64 904}
!17 = !{!"_ZTSN4Simd4Base25SynetMergedConvolution32fE", !18, 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}
!18 = !{!"_ZTSN4Simd25SynetMergedConvolution32fE", !19, i64 0, !20, i64 8, !22, i64 576, !24, i64 592}
!19 = !{!"_ZTSN4Simd9DeletableE"}
!20 = !{!"_ZTSN4Simd13MergConvParamE", !8, i64 0, !7, i64 552, !21, i64 560}
!21 = !{!"_ZTS8SimdBool", !8, i64 0}
!22 = !{!"_ZTSN4Simd5ArrayIfEE", !23, i64 0, !7, i64 8}
!23 = !{!"any pointer", !8, i64 0}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !25, i64 0, !7, i64 8, !8, i64 16}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !23, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !8, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = !{!33}
!33 = distinct !{!33, !34}
!34 = distinct !{!34, !"LVerDomain"}
!35 = !{!36}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !29, !38, !39}
!38 = !{!"llvm.loop.isvectorized", i32 1}
!39 = !{!"llvm.loop.unroll.runtime.disable"}
!40 = distinct !{!40, !29}
!41 = distinct !{!41, !29, !38}
!42 = distinct !{!42, !31}
!43 = distinct !{!43, !29, !38, !39}
!44 = distinct !{!44, !29, !38}


; 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