; LLVM IR from huawei-noah/bolt :: compute/tensor/src (convolution)

; 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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.ConvolutionParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %union.ActivationSpec, i32, i32, i32, i32 }
%union.ActivationSpec = type { %struct.ClipParamSpec }
%struct.ClipParamSpec = type { float, float }
%struct.ActivationParamSpec = type { i32, [4 x float] }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%struct.ArchInfo = type { i32, ptr }

; 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: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11autoPadding10TensorDescS_R20ConvolutionParamSpec(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef nonnull align 4 dereferenceable(108)) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11convolutionSt6vectorI6TensorSaIS0_EES0_20ConvolutionParamSpec27ConvolutionForwardAlgorithmPvS0_S2_S0_19ActivationParamSpecP8ArchInfo(ptr noundef %0, ptr noundef %1, ptr noundef byval(%struct.ConvolutionParamSpec) align 8 %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef byval(%struct.ActivationParamSpec) align 8 %8, ptr noundef %9) #1 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.TensorDesc, align 4
  %21 = alloca ptr, align 8
  %22 = alloca %class.Tensor, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca %struct.TensorDesc, align 4
  %26 = alloca ptr, align 8
  %27 = alloca %class.Tensor, align 8
  %28 = alloca %struct.TensorDesc, align 4
  %29 = alloca ptr, align 8
  %30 = alloca %class.Tensor, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca %class.Tensor, align 8
  %34 = alloca %struct.TensorDesc, align 4
  %35 = alloca ptr, align 8
  %36 = alloca %class.Tensor, align 8
  %37 = alloca %struct.TensorDesc, align 4
  %38 = alloca %struct.ActivationParamSpec, align 4
  %39 = alloca ptr, align 8
  %40 = alloca i8, align 1
  %41 = alloca %struct.TensorDesc, align 4
  %42 = alloca %class.Tensor, align 8
  %43 = alloca %struct.TensorDesc, align 4
  %44 = alloca i32, align 4
  %45 = alloca %struct.TensorDesc, align 8
  %46 = alloca %struct.TensorDesc, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store i32 %3, ptr %13, align 4, !tbaa !9
  store ptr %4, ptr %14, align 8, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %9, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ArchInfo, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !11
  store i32 %49, ptr %19, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 92, ptr %20) #6
  %50 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %20, ptr noundef nonnull align 8 dereferenceable(32) %50)
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %51 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %51) #6
  %52 = load i32, ptr %19, align 4, !tbaa !14
  %53 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %22, i32 noundef %52)
          to label %54 unwind label %79

54:                                               ; preds = %10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  store ptr %53, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %25) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %25, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %55 = load i32, ptr %19, align 4, !tbaa !14
  %56 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %27, i32 noundef %55)
          to label %57 unwind label %83

57:                                               ; preds = %54
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  store ptr %56, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %28) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %28, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %58 = load i32, ptr %19, align 4, !tbaa !14
  %59 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %30, i32 noundef %58)
          to label %60 unwind label %87

60:                                               ; preds = %57
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  store ptr %59, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %62 = call noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %61)
  store i32 %62, ptr %31, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #6
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) %63) #6
  %64 = load i32, ptr %19, align 4, !tbaa !14
  %65 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %33, i32 noundef %64)
          to label %66 unwind label %91

66:                                               ; preds = %60
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #6
  store ptr %65, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %34) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %34, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %67 = load i32, ptr %19, align 4, !tbaa !14
  %68 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %36, i32 noundef %67)
          to label %69 unwind label %95

69:                                               ; preds = %66
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #6
  store ptr %68, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr %37) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %25, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.start.p0(i64 20, ptr %38) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 8 %8, i64 20, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #6
  store ptr null, ptr %39, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #6
  store i8 1, ptr %40, align 1, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 92, ptr %41) #6
  call void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92) %41) #6
  %70 = call noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %71 = icmp ugt i64 %70, 1
  br i1 %71, label %72, label %103

72:                                               ; preds = %69
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %42, ptr noundef nonnull align 8 dereferenceable(32) %73) #6
  %74 = load i32, ptr %19, align 4, !tbaa !14
  %75 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %42, i32 noundef %74)
          to label %76 unwind label %99

76:                                               ; preds = %72
  store ptr %75, ptr %39, align 8, !tbaa !5
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr %43) #6
  %77 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %43, ptr noundef nonnull align 8 dereferenceable(32) %77)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %41, ptr align 4 %43, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 92, ptr %43) #6
  %78 = getelementptr inbounds %struct.ActivationParamSpec, ptr %8, i32 0, i32 0
  store i32 0, ptr %78, align 8, !tbaa !28
  br label %103

79:                                               ; preds = %10
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %23, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br label %113

83:                                               ; preds = %54
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %23, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  br label %112

87:                                               ; preds = %57
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %23, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %111

91:                                               ; preds = %60
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %23, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #6
  br label %110

95:                                               ; preds = %66
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %23, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #6
  br label %109

99:                                               ; preds = %72
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %23, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %24, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %42) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %37) #6
  br label %109

103:                                              ; preds = %76, %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #6
  store i32 51, ptr %44, align 4, !tbaa !30
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %20, i64 92, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %34, i64 92, i1 false), !tbaa.struct !17
  call void @_Z11autoPadding10TensorDescS_R20ConvolutionParamSpec(ptr noundef byval(%struct.TensorDesc) align 8 %45, ptr noundef byval(%struct.TensorDesc) align 8 %46, ptr noundef nonnull align 4 dereferenceable(108) %2)
  %104 = load i32, ptr %19, align 4, !tbaa !14
  %105 = icmp eq i32 %104, 1
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  br label %107

107:                                              ; preds = %106, %103
  %108 = load i32, ptr %44, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 20, ptr %38) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %37) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  ret i32 %108

109:                                              ; preds = %99, %95
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %34) #6
  br label %110

110:                                              ; preds = %109, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %111

111:                                              ; preds = %110, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %28) #6
  br label %112

112:                                              ; preds = %111, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %25) #6
  br label %113

113:                                              ; preds = %112, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %23, align 8
  %116 = load i32, ptr %24, align 4
  %117 = insertvalue { ptr, i32 } poison, ptr %115, 0
  %118 = insertvalue { ptr, i32 } %117, i32 %116, 1
  resume { ptr, i32 } %118
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { 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 #6 = { 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, !10, i64 0}
!10 = !{!"_ZTS27ConvolutionForwardAlgorithm", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS8ArchInfo", !13, i64 0, !6, i64 8}
!13 = !{!"_ZTS4Arch", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !20, i64 8, i64 4, !15, i64 12, i64 80, !22}
!18 = !{!19, !19, i64 0}
!19 = !{!"_ZTS8DataType", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTS10DataFormat", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{i64 0, i64 4, !24, i64 4, i64 16, !22}
!24 = !{!25, !25, i64 0}
!25 = !{!"_ZTS14ActivationMode", !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"bool", !7, i64 0}
!28 = !{!29, !25, i64 0}
!29 = !{!"_ZTS19ActivationParamSpec", !25, i64 0, !7, i64 4}
!30 = !{!31, !31, i64 0}
!31 = !{!"_ZTS2EE", !7, i64 0}


; 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"

%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%struct.ConvolutionParamSpec = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %union.ActivationSpec, i32, i32, i32, i32 }
%union.ActivationSpec = type { %struct.ClipParamSpec }
%struct.ClipParamSpec = type { float, float }
%struct.ActivationParamSpec = type { i32, [4 x float] }
%class.Tensor = type { %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor8get_descEv(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11autoPadding10TensorDescS_R20ConvolutionParamSpec(ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef byval(%struct.TensorDesc) align 8, ptr noundef nonnull align 4 dereferenceable(108)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11convolutionSt6vectorI6TensorSaIS0_EES0_20ConvolutionParamSpec27ConvolutionForwardAlgorithmPvS0_S2_S0_19ActivationParamSpecP8ArchInfo(ptr noundef nonnull %0, ptr noundef %1, ptr noundef byval(%struct.ConvolutionParamSpec) align 8 %2, i32 noundef %3, ptr nocapture noundef readnone %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr nocapture noundef readnone byval(%struct.ActivationParamSpec) align 8 %8, ptr nocapture noundef readonly %9) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %11 = alloca %struct.TensorDesc, align 8
  %12 = alloca %class.Tensor, align 8
  %13 = alloca %struct.TensorDesc, align 4
  %14 = alloca %class.Tensor, align 8
  %15 = alloca %struct.TensorDesc, align 4
  %16 = alloca %class.Tensor, align 8
  %17 = alloca %class.Tensor, align 8
  %18 = alloca %struct.TensorDesc, align 8
  %19 = alloca %class.Tensor, align 8
  %20 = alloca %struct.TensorDesc, align 4
  %21 = alloca %class.Tensor, align 8
  %22 = alloca %struct.TensorDesc, align 4
  %23 = load i32, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %11) #6
  %24 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %11, ptr noundef nonnull align 8 dereferenceable(32) %24)
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  %26 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %12, i32 noundef %23)
          to label %27 unwind label %46

27:                                               ; preds = %10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %13) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %13, ptr noundef nonnull align 8 dereferenceable(32) %1)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %1) #6
  %28 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %14, i32 noundef %23)
          to label %29 unwind label %48

29:                                               ; preds = %27
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %15) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %15, ptr noundef nonnull align 8 dereferenceable(32) %5)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %30 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %16, i32 noundef %23)
          to label %31 unwind label %50

31:                                               ; preds = %29
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  %32 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  %33 = call noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
  %34 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %34) #6
  %35 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %17, i32 noundef %23)
          to label %36 unwind label %52

36:                                               ; preds = %31
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %18) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %18, ptr noundef nonnull align 8 dereferenceable(32) %7)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  %37 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %19, i32 noundef %23)
          to label %38 unwind label %54

38:                                               ; preds = %36
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %20) #6
  call void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92) %20) #6
  %39 = call noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %40 = icmp ugt i64 %39, 1
  br i1 %40, label %41, label %58

41:                                               ; preds = %38
  %42 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %42) #6
  %43 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %21, i32 noundef %23)
          to label %44 unwind label %56

44:                                               ; preds = %41
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %22) #6
  %45 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #6
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %22, ptr noundef nonnull align 8 dereferenceable(32) %45)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(92) %20, ptr noundef nonnull align 4 dereferenceable(92) %22, i64 92, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %22) #6
  br label %58

46:                                               ; preds = %10
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %62

48:                                               ; preds = %27
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %61

50:                                               ; preds = %29
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %60

52:                                               ; preds = %31
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #6
  br label %60

54:                                               ; preds = %36
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #6
  br label %59

56:                                               ; preds = %41
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %20) #6
  br label %59

58:                                               ; preds = %44, %38
  call void @_Z11autoPadding10TensorDescS_R20ConvolutionParamSpec(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %11, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %18, ptr noundef nonnull align 4 dereferenceable(108) %2)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %11) #6
  ret i32 51

59:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %18) #6
  br label %60

60:                                               ; preds = %52, %59, %50
  %.pn.pn.pn = phi { ptr, i32 } [ %51, %50 ], [ %.pn, %59 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %15) #6
  br label %61

61:                                               ; preds = %60, %48
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %60 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %13) #6
  br label %62

62:                                               ; preds = %61, %46
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %61 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %11) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt6vectorI6TensorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10TensorDescC2Ev(ptr noundef nonnull align 4 dereferenceable(92)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6TensorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { inlinehint 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 #5 = { 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 #6 = { 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, !7, i64 0}
!6 = !{!"_ZTS8ArchInfo", !7, i64 0, !10, i64 8}
!7 = !{!"_ZTS4Arch", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !14, i64 8, i64 4, !16, i64 12, i64 80, !18}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS8DataType", !8, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS10DataFormat", !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!8, !8, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass