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

; 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.OneHotParamSpec = type { i32, i32, [2 x float] }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z24onehot_infer_output_sizeP6Tensor15OneHotParamSpec8DataTypeS0_P8ArchInfo(ptr noundef %0, i64 %1, <2 x float> %2, i32 noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca %struct.OneHotParamSpec, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.TensorDesc, align 4
  %15 = alloca %struct.TensorDesc, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %struct.TensorDesc, align 8
  %19 = getelementptr inbounds { i64, <2 x float> }, ptr %7, i32 0, i32 0
  store i64 %1, ptr %19, align 4
  %20 = getelementptr inbounds { i64, <2 x float> }, ptr %7, i32 0, i32 1
  store <2 x float> %2, ptr %20, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %26, label %23

23:                                               ; preds = %6
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %42

26:                                               ; preds = %23, %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !11
  %27 = load i32, ptr %12, align 4, !tbaa !11
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %41

29:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  %30 = call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %31 = trunc i64 %30 to i32
  store i32 %31, ptr %13, align 4, !tbaa !13
  %32 = load i32, ptr %13, align 4, !tbaa !13
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %32)
  %34 = load ptr, ptr @stdout, align 8, !tbaa !5
  %35 = call i32 @fflush(ptr noundef %34)
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = call ptr @ee2str(i32 noundef %36)
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %37)
  %39 = load ptr, ptr @stdout, align 8, !tbaa !5
  %40 = call i32 @fflush(ptr noundef %39)
  call void @exit(i32 noundef 1) #9
  unreachable

41:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %42

42:                                               ; preds = %41, %23
  call void @llvm.lifetime.start.p0(i64 92, ptr %14) #8
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %14, ptr noundef nonnull align 8 dereferenceable(32) %43)
  call void @llvm.lifetime.start.p0(i64 92, ptr %15) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %14, i64 92, i1 false), !tbaa.struct !15
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 0
  store i32 %44, ptr %45, align 4, !tbaa !19
  %46 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 2
  %47 = load i32, ptr %46, align 4, !tbaa !21
  %48 = add i32 %47, 1
  store i32 %48, ptr %46, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %49 = getelementptr inbounds %struct.OneHotParamSpec, ptr %7, i32 0, i32 0
  %50 = load i32, ptr %49, align 4, !tbaa !22
  %51 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !21
  %53 = add i32 %50, %52
  %54 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 2
  %55 = load i32, ptr %54, align 4, !tbaa !21
  %56 = urem i32 %53, %55
  store i32 %56, ptr %16, align 4, !tbaa !13
  %57 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !21
  %59 = sub i32 %58, 1
  %60 = load i32, ptr %16, align 4, !tbaa !13
  %61 = sub i32 %59, %60
  store i32 %61, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %62 = load i32, ptr %16, align 4, !tbaa !13
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %17, align 4, !tbaa !13
  br label %64

64:                                               ; preds = %81, %42
  %65 = load i32, ptr %17, align 4, !tbaa !13
  %66 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 2
  %67 = load i32, ptr %66, align 4, !tbaa !21
  %68 = icmp ult i32 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %84

70:                                               ; preds = %64
  %71 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 3
  %72 = load i32, ptr %17, align 4, !tbaa !13
  %73 = sub i32 %72, 1
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds [20 x i32], ptr %71, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !13
  %77 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 3
  %78 = load i32, ptr %17, align 4, !tbaa !13
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds [20 x i32], ptr %77, i64 0, i64 %79
  store i32 %76, ptr %80, align 4, !tbaa !13
  br label %81

81:                                               ; preds = %70
  %82 = load i32, ptr %17, align 4, !tbaa !13
  %83 = add i32 %82, 1
  store i32 %83, ptr %17, align 4, !tbaa !13
  br label %64, !llvm.loop !24

84:                                               ; preds = %69
  %85 = getelementptr inbounds %struct.OneHotParamSpec, ptr %7, i32 0, i32 1
  %86 = load i32, ptr %85, align 4, !tbaa !26
  %87 = getelementptr inbounds %struct.TensorDesc, ptr %15, i32 0, i32 3
  %88 = load i32, ptr %16, align 4, !tbaa !13
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [20 x i32], ptr %87, i64 0, i64 %89
  store i32 %86, ptr %90, align 4, !tbaa !13
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %15, i64 92, i1 false), !tbaa.struct !15
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %91, ptr noundef byval(%struct.TensorDesc) align 8 %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr %14) #8
  ret i32 0
}

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #2

declare i32 @printf(ptr noundef, ...) #3

declare i32 @fflush(ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #5

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

; 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)) #6 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) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) #6 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { "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 = { noreturn nounwind "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 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"_ZTS8DataType", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS2EE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !16, i64 8, i64 4, !13, i64 12, i64 80, !18}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS10DataFormat", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTS10TensorDesc", !10, i64 0, !17, i64 4, !14, i64 8, !7, i64 12}
!21 = !{!20, !14, i64 8}
!22 = !{!23, !14, i64 0}
!23 = !{!"_ZTS15OneHotParamSpec", !14, i64 0, !14, i64 4, !7, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!23, !14, i64 4}


; 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] }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z24onehot_infer_output_sizeP6Tensor15OneHotParamSpec8DataTypeS0_P8ArchInfo(ptr noundef %0, i64 %1, <2 x float> %2, i32 noundef %3, ptr noundef %4, ptr nocapture noundef readnone %5) local_unnamed_addr #0 {
  %7 = alloca %struct.TensorDesc, align 4
  %8 = alloca %struct.TensorDesc, align 8
  %9 = icmp eq ptr %0, null
  %10 = icmp eq ptr %4, null
  %or.cond = or i1 %9, %10
  br i1 %or.cond, label %11, label %21

11:                                               ; preds = %6
  %12 = tail call i64 (i64, ...) @syscall(i64 noundef 186) #8
  %13 = trunc i64 %12 to i32
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %13)
  %15 = load ptr, ptr @stdout, align 8, !tbaa !5
  %16 = tail call i32 @fflush(ptr noundef %15)
  %17 = tail call ptr @ee2str(i32 noundef 1)
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %17)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = tail call i32 @fflush(ptr noundef %19)
  tail call void @exit(i32 noundef 1) #9
  unreachable

21:                                               ; preds = %6
  %.sroa.0.0.extract.trunc = trunc i64 %1 to i32
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %7) #8
  call void @_ZN6Tensor8get_descEv(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %7, ptr noundef nonnull align 8 dereferenceable(32) %0)
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %8) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(92) %8, ptr noundef nonnull align 4 dereferenceable(92) %7, i64 92, i1 false), !tbaa.struct !9
  store i32 %3, ptr %8, align 8, !tbaa !17
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  %23 = load i32, ptr %22, align 8, !tbaa !19
  %24 = add i32 %23, 1
  store i32 %24, ptr %22, align 8, !tbaa !19
  %25 = add i32 %24, %.sroa.0.0.extract.trunc
  %26 = urem i32 %25, %24
  %27 = sub i32 %23, %26
  %.015 = add i32 %27, 1
  %28 = icmp ult i32 %.015, %24
  br i1 %28, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %21
  %29 = getelementptr inbounds i8, ptr %8, i64 12
  %30 = zext i32 %.015 to i64
  %31 = zext i32 %24 to i64
  %32 = sub nsw i64 %31, %30
  %min.iters.check = icmp ult i64 %32, 28
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph
  %indvars.iv.ph = phi i64 [ %30, %vector.memcheck ], [ %30, %vector.scevcheck ], [ %30, %.lr.ph ], [ %ind.end, %middle.block ]
  %.0.in16.ph = phi i32 [ %27, %vector.memcheck ], [ %27, %vector.scevcheck ], [ %27, %.lr.ph ], [ %ind.end19, %middle.block ]
  br label %scalar.ph

vector.scevcheck:                                 ; preds = %.lr.ph
  %33 = xor i64 %30, -1
  %34 = add nsw i64 %33, %31
  %35 = trunc i64 %34 to i32
  %36 = xor i32 %27, -1
  %37 = icmp ult i32 %36, %35
  %38 = icmp ugt i64 %34, 4294967295
  %39 = or i1 %37, %38
  br i1 %39, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %40 = zext i32 %27 to i64
  %41 = sub nsw i64 %30, %40
  %42 = and i64 %41, 4611686018427387896
  %diff.check = icmp eq i64 %42, 0
  br i1 %diff.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %32, -8
  %ind.end = add nsw i64 %n.vec, %30
  %.cast = trunc i64 %n.vec to i32
  %ind.end19 = add i32 %27, %.cast
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %index, %30
  %.cast21 = trunc i64 %index to i32
  %offset.idx22 = add i32 %27, %.cast21
  %43 = zext i32 %offset.idx22 to i64
  %44 = getelementptr inbounds [20 x i32], ptr %29, i64 0, i64 %43
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  %wide.load = load <4 x i32>, ptr %44, align 4, !tbaa !14
  %wide.load23 = load <4 x i32>, ptr %45, align 4, !tbaa !14
  %46 = getelementptr inbounds [20 x i32], ptr %29, i64 0, i64 %offset.idx
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store <4 x i32> %wide.load, ptr %46, align 4, !tbaa !14
  store <4 x i32> %wide.load23, ptr %47, align 4, !tbaa !14
  %index.next = add nuw i64 %index, 8
  %48 = icmp eq i64 %index.next, %n.vec
  br i1 %48, label %middle.block, label %vector.body, !llvm.loop !20

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %32, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph, %middle.block, %21
  %.sroa.2.0.extract.shift = lshr i64 %1, 32
  %.sroa.2.0.extract.trunc = trunc nuw i64 %.sroa.2.0.extract.shift to i32
  %49 = getelementptr inbounds i8, ptr %8, i64 12
  %50 = sext i32 %27 to i64
  %51 = getelementptr inbounds [20 x i32], ptr %49, i64 0, i64 %50
  store i32 %.sroa.2.0.extract.trunc, ptr %51, align 4, !tbaa !14
  call void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %8)
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %7) #8
  ret i32 0

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.0.in16 = phi i32 [ %57, %scalar.ph ], [ %.0.in16.ph, %scalar.ph.preheader ]
  %52 = zext i32 %.0.in16 to i64
  %53 = getelementptr inbounds [20 x i32], ptr %29, i64 0, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !14
  %55 = getelementptr inbounds [20 x i32], ptr %29, i64 0, i64 %indvars.iv
  store i32 %54, ptr %55, align 4, !tbaa !14
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %56 = icmp ult i64 %indvars.iv.next, %31
  %57 = trunc nuw i64 %indvars.iv to i32
  br i1 %56, label %scalar.ph, label %._crit_edge, !llvm.loop !24
}

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local ptr @ee2str(i32 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

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

; 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 #6 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) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor6resizeE10TensorDesc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #6 align 2

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { nofree nounwind "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 = { noreturn nounwind "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 = { 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 #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !12, i64 8, i64 4, !14, i64 12, i64 80, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTS8DataType", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS10DataFormat", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !11, i64 0}
!18 = !{!"_ZTS10TensorDesc", !11, i64 0, !13, i64 4, !15, i64 8, !7, i64 12}
!19 = !{!18, !15, i64 8}
!20 = distinct !{!20, !21, !22, !23}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !21, !22}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass