; LLVM IR from huawei-noah/bolt :: compute/tensor/src/cpu/x86/int8/avx (quantize)

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

@__const._Z15quantizeF32ToU810TensorDescPKfPS_PhPfi.index = external hidden unnamed_addr constant [32 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z15quantizeF32ToU810TensorDescPKfPS_PhPfi(ptr noundef byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %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 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca float, align 4
  %18 = alloca [32 x i8], align 16
  %19 = alloca i32, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  %20 = load ptr, ptr %11, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %6
  store i32 2, ptr %7, align 4
  br label %136

23:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 8 %0, i64 92, i1 false), !tbaa.struct !11
  %24 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %14)
  store i32 %24, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %25 = load i32, ptr %13, align 4, !tbaa !9
  %26 = udiv i32 %25, 8
  store i32 %26, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = urem i32 %27, 8
  store i32 %28, ptr %16, align 4, !tbaa !9
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %35

31:                                               ; preds = %23
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = load float, ptr %32, align 4, !tbaa !17
  %34 = fcmp olt float %33, 0.000000e+00
  br i1 %34, label %35, label %54

35:                                               ; preds = %31, %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load float, ptr %36, align 4, !tbaa !17
  store float %37, ptr %17, align 4, !tbaa !17
  %38 = load i32, ptr %15, align 4, !tbaa !9
  %39 = load i32, ptr %16, align 4, !tbaa !9
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef %38, i32 noundef %39, ptr noundef %40, ptr noundef %41)
  %42 = load float, ptr %17, align 4, !tbaa !17
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = load float, ptr %43, align 4, !tbaa !17
  %45 = fcmp ogt float %42, %44
  br i1 %45, label %46, label %48

46:                                               ; preds = %35
  %47 = load float, ptr %17, align 4, !tbaa !17
  br label %51

48:                                               ; preds = %35
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load float, ptr %49, align 4, !tbaa !17
  br label %51

51:                                               ; preds = %48, %46
  %52 = phi float [ %47, %46 ], [ %50, %48 ]
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  store float %52, ptr %53, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %54

54:                                               ; preds = %51, %31
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const._Z15quantizeF32ToU810TensorDescPKfPS_PhPfi.index, i64 32, i1 false)
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = getelementptr inbounds [32 x i8], ptr %18, i64 0, i64 0
  %60 = call { ptr, ptr, ptr } asm sideeffect "vmovups ($4), %ymm6                    \0A\09mov $$0x43000000, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm2            \0A\09vbroadcastss ($2), %ymm0              \0A\09mov $$255, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm4            \0A\09mov $$1, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm5            \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                              \0A\090:                                     \0A\09vmulps ($0), %ymm0, %ymm1            \0A\09vaddps %ymm1, %ymm2, %ymm3          \0A\09vcvtps2dq %ymm3, %ymm1   \0A\09vpmaxsd %ymm5, %ymm1, %ymm1          \0A\09vpminsd %ymm4, %ymm1, %ymm1          \0A\09vpshufb %ymm6, %ymm1, %ymm3                 \0A\09vpermd  %ymm3, %ymm6, %ymm1                 \0A\09movq  %xmm1, ($1)                 \0A\09add $$0x20, $0                          \0A\09add $$0x8, $1                          \0A\09dec %ebx                              \0A\09jg 0b                                  \0A\09.align 16                              \0A\091:                                     \0A\09", "=r,=r,=r,r,r,0,1,2,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %58, ptr %59, ptr %55, ptr %56, ptr %57) #6, !srcloc !19
  %61 = extractvalue { ptr, ptr, ptr } %60, 0
  %62 = extractvalue { ptr, ptr, ptr } %60, 1
  %63 = extractvalue { ptr, ptr, ptr } %60, 2
  store ptr %61, ptr %8, align 8, !tbaa !5
  store ptr %62, ptr %10, align 8, !tbaa !5
  store ptr %63, ptr %11, align 8, !tbaa !5
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = mul i32 %64, 8
  store i32 %65, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %132, %54
  %67 = load i32, ptr %19, align 4, !tbaa !9
  %68 = load i32, ptr %16, align 4, !tbaa !9
  %69 = icmp ult i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %135

71:                                               ; preds = %66
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %19, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds float, ptr %72, i64 %74
  %76 = load float, ptr %75, align 4, !tbaa !17
  %77 = load ptr, ptr %11, align 8, !tbaa !5
  %78 = getelementptr inbounds float, ptr %77, i64 0
  %79 = load float, ptr %78, align 4, !tbaa !17
  %80 = call float @llvm.fmuladd.f32(float %76, float %79, float 1.280000e+02)
  %81 = call noundef float @_ZSt5roundf(float noundef %80)
  %82 = fcmp olt float %81, 2.550000e+02
  br i1 %82, label %83, label %94

83:                                               ; preds = %71
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load i32, ptr %19, align 4, !tbaa !9
  %86 = zext i32 %85 to i64
  %87 = getelementptr inbounds float, ptr %84, i64 %86
  %88 = load float, ptr %87, align 4, !tbaa !17
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds float, ptr %89, i64 0
  %91 = load float, ptr %90, align 4, !tbaa !17
  %92 = call float @llvm.fmuladd.f32(float %88, float %91, float 1.280000e+02)
  %93 = call noundef float @_ZSt5roundf(float noundef %92)
  br label %95

94:                                               ; preds = %71
  br label %95

95:                                               ; preds = %94, %83
  %96 = phi float [ %93, %83 ], [ 2.550000e+02, %94 ]
  %97 = fcmp ogt float %96, 1.000000e+00
  br i1 %97, label %98, label %124

98:                                               ; preds = %95
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = load i32, ptr %19, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds float, ptr %99, i64 %101
  %103 = load float, ptr %102, align 4, !tbaa !17
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds float, ptr %104, i64 0
  %106 = load float, ptr %105, align 4, !tbaa !17
  %107 = call float @llvm.fmuladd.f32(float %103, float %106, float 1.280000e+02)
  %108 = call noundef float @_ZSt5roundf(float noundef %107)
  %109 = fcmp olt float %108, 2.550000e+02
  br i1 %109, label %110, label %121

110:                                              ; preds = %98
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load i32, ptr %19, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds float, ptr %111, i64 %113
  %115 = load float, ptr %114, align 4, !tbaa !17
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds float, ptr %116, i64 0
  %118 = load float, ptr %117, align 4, !tbaa !17
  %119 = call float @llvm.fmuladd.f32(float %115, float %118, float 1.280000e+02)
  %120 = call noundef float @_ZSt5roundf(float noundef %119)
  br label %122

121:                                              ; preds = %98
  br label %122

122:                                              ; preds = %121, %110
  %123 = phi float [ %120, %110 ], [ 2.550000e+02, %121 ]
  br label %125

124:                                              ; preds = %95
  br label %125

125:                                              ; preds = %124, %122
  %126 = phi float [ %123, %122 ], [ 1.000000e+00, %124 ]
  %127 = fptoui float %126 to i8
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = load i32, ptr %19, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds i8, ptr %128, i64 %130
  store i8 %127, ptr %131, align 1, !tbaa !16
  br label %132

132:                                              ; preds = %125
  %133 = load i32, ptr %19, align 4, !tbaa !9
  %134 = add i32 %133, 1
  store i32 %134, ptr %19, align 4, !tbaa !9
  br label %66, !llvm.loop !20

135:                                              ; preds = %70
  store i32 0, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %136

136:                                              ; preds = %135, %22
  %137 = load i32, ptr %7, align 4
  ret i32 %137
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #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) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !12, i64 4, i64 4, !14, i64 8, i64 4, !9, i64 12, i64 80, !16}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS8DataType", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTS10DataFormat", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{i64 6492, i64 6535, i64 6574, i64 6629, i64 6684, i64 6739, i64 6771, i64 6826, i64 6881, i64 6911, i64 6966, i64 7021, i64 7051, i64 7107, i64 7164, i64 7219, i64 7274, i64 7329, i64 7384, i64 7427, i64 7483, i64 7539, i64 7602, i64 7665, i64 7716, i64 7771, i64 7825, i64 7880, i64 7935, i64 7992, i64 8047}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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

@__const._Z15quantizeF32ToU810TensorDescPKfPS_PhPfi.index = external hidden unnamed_addr constant [32 x i8], align 16

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 3) i32 @_Z15quantizeF32ToU810TensorDescPKfPS_PhPfi(ptr nocapture noundef readonly byval(%struct.TensorDesc) align 8 %0, ptr noundef %1, ptr nocapture noundef readnone %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca [32 x i8], align 16
  %8 = icmp eq ptr %4, null
  br i1 %8, label %48, label %9

9:                                                ; preds = %6
  %10 = tail call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %0)
  %11 = lshr i32 %10, 3
  %12 = and i32 %10, 7
  %.not = icmp eq i32 %5, 0
  %.pre = load float, ptr %4, align 4, !tbaa !5
  %13 = fcmp olt float %.pre, 0.000000e+00
  %or.cond = select i1 %.not, i1 true, i1 %13
  br i1 %or.cond, label %14, label %17

14:                                               ; preds = %9
  tail call void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef %11, i32 noundef %12, ptr noundef %1, ptr noundef nonnull %4)
  %15 = load float, ptr %4, align 4, !tbaa !5
  %16 = fcmp ogt float %.pre, %15
  %. = select i1 %16, float %.pre, float %15
  store float %., ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %9, %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %7, ptr noundef nonnull align 16 dereferenceable(32) @__const._Z15quantizeF32ToU810TensorDescPKfPS_PhPfi.index, i64 32, i1 false)
  %18 = call { ptr, ptr, ptr } asm sideeffect "vmovups ($4), %ymm6                    \0A\09mov $$0x43000000, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm2            \0A\09vbroadcastss ($2), %ymm0              \0A\09mov $$255, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm4            \0A\09mov $$1, %ebx \0A\09vmovd %ebx, %xmm1                    \0A\09vbroadcastss %xmm1, %ymm5            \0A\09mov $3, %ebx \0A\09cmp $$0x0, %ebx                         \0A\09je 1f                                    \0A\09.align 16                              \0A\090:                                     \0A\09vmulps ($0), %ymm0, %ymm1            \0A\09vaddps %ymm1, %ymm2, %ymm3          \0A\09vcvtps2dq %ymm3, %ymm1   \0A\09vpmaxsd %ymm5, %ymm1, %ymm1          \0A\09vpminsd %ymm4, %ymm1, %ymm1          \0A\09vpshufb %ymm6, %ymm1, %ymm3                 \0A\09vpermd  %ymm3, %ymm6, %ymm1                 \0A\09movq  %xmm1, ($1)                 \0A\09add $$0x20, $0                          \0A\09add $$0x8, $1                          \0A\09dec %ebx                              \0A\09jg 0b                                  \0A\09.align 16                              \0A\091:                                     \0A\09", "=r,=r,=r,r,r,0,1,2,~{ebx},~{ymm0},~{ymm1},~{ymm2},~{ymm3},~{ymm4},~{ymm5},~{ymm6},~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 %11, ptr nonnull %7, ptr %1, ptr %3, ptr nonnull %4) #6, !srcloc !9
  %19 = extractvalue { ptr, ptr, ptr } %18, 0
  %20 = extractvalue { ptr, ptr, ptr } %18, 1
  %21 = extractvalue { ptr, ptr, ptr } %18, 2
  %.not42 = icmp eq i32 %12, 0
  br i1 %.not42, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %17
  %wide.trip.count = zext nneg i32 %12 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %44, %17
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  br label %48

.lr.ph:                                           ; preds = %.lr.ph.preheader, %44
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %44 ]
  %22 = getelementptr inbounds float, ptr %19, i64 %indvars.iv
  %23 = load float, ptr %22, align 4, !tbaa !5
  %24 = load float, ptr %21, align 4, !tbaa !5
  %25 = call float @llvm.fmuladd.f32(float %23, float %24, float 1.280000e+02)
  %26 = call noundef float @_ZSt5roundf(float noundef %25)
  %27 = fcmp olt float %26, 2.550000e+02
  br i1 %27, label %28, label %.thread

28:                                               ; preds = %.lr.ph
  %29 = load float, ptr %22, align 4, !tbaa !5
  %30 = load float, ptr %21, align 4, !tbaa !5
  %31 = call float @llvm.fmuladd.f32(float %29, float %30, float 1.280000e+02)
  %32 = call noundef float @_ZSt5roundf(float noundef %31)
  %33 = fcmp ogt float %32, 1.000000e+00
  br i1 %33, label %.thread, label %44

.thread:                                          ; preds = %.lr.ph, %28
  %34 = load float, ptr %22, align 4, !tbaa !5
  %35 = load float, ptr %21, align 4, !tbaa !5
  %36 = call float @llvm.fmuladd.f32(float %34, float %35, float 1.280000e+02)
  %37 = call noundef float @_ZSt5roundf(float noundef %36)
  %38 = fcmp olt float %37, 2.550000e+02
  br i1 %38, label %39, label %44

39:                                               ; preds = %.thread
  %40 = load float, ptr %22, align 4, !tbaa !5
  %41 = load float, ptr %21, align 4, !tbaa !5
  %42 = call float @llvm.fmuladd.f32(float %40, float %41, float 1.280000e+02)
  %43 = call noundef float @_ZSt5roundf(float noundef %42)
  br label %44

44:                                               ; preds = %28, %39, %.thread
  %45 = phi float [ %43, %39 ], [ 2.550000e+02, %.thread ], [ 1.000000e+00, %28 ]
  %46 = fptoui float %45 to i8
  %47 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv
  store i8 %46, ptr %47, align 1, !tbaa !10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

48:                                               ; preds = %6, %._crit_edge
  %.037 = phi i32 [ 0, %._crit_edge ], [ 2, %6 ]
  ret i32 %.037
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #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) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z25getSymmetricQuantizeScalejjPKfPf(i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; 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 nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 6492, i64 6535, i64 6574, i64 6629, i64 6684, i64 6739, i64 6771, i64 6826, i64 6881, i64 6911, i64 6966, i64 7021, i64 7051, i64 7107, i64 7164, i64 7219, i64 7274, i64 7329, i64 7384, i64 7427, i64 7483, i64 7539, i64 7602, i64 7665, i64 7716, i64 7771, i64 7825, i64 7880, i64 7935, i64 7992, i64 8047}
!10 = !{!7, !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass