; LLVM IR from huawei-noah/bolt :: compute/tensor/tests/test_tile.ll (Z8tileTestiPPc8DataType)

; 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.ArchInfo = type { i32, ptr }
%struct.TileParamSpec = type { [8 x i32], i32, i32 }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%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" }

@_ZL15UT_CPU_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.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
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8tileTestiPPc8DataType(i32 noundef %0, ptr noundef %1, i32 noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.TileParamSpec, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.TensorDesc, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.TensorDesc, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %class.Tensor, align 8
  %18 = alloca %struct.TensorDesc, align 8
  %19 = alloca %class.Tensor, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %class.Tensor, align 8
  %23 = alloca i32, align 4
  %24 = alloca %struct.TileParamSpec, align 8
  %25 = alloca i32, align 4
  %26 = alloca %class.Tensor, align 8
  %27 = alloca i32, align 4
  %28 = alloca %class.Tensor, align 8
  %29 = alloca %struct.TileParamSpec, align 8
  %30 = alloca %class.Tensor, align 8
  %31 = alloca %class.Tensor, align 8
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  %34 = load ptr, ptr %5, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 1
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = call i32 @atoi(ptr noundef %36) #10
  store i32 %37, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %38 = load ptr, ptr %5, align 8, !tbaa !9
  %39 = getelementptr inbounds ptr, ptr %38, i64 2
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = call i32 @atoi(ptr noundef %40) #10
  store i32 %41, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = getelementptr inbounds ptr, ptr %42, i64 3
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = call i32 @atoi(ptr noundef %44) #10
  store i32 %45, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i64 4
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = call i32 @atoi(ptr noundef %48) #10
  store i32 %49, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #9
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = getelementptr inbounds ptr, ptr %50, i64 5
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = call i32 @atoi(ptr noundef %52) #10
  %54 = getelementptr inbounds %struct.TileParamSpec, ptr %11, i32 0, i32 2
  store i32 %53, ptr %54, align 4, !tbaa !13
  %55 = getelementptr inbounds %struct.TileParamSpec, ptr %11, i32 0, i32 1
  store i32 1, ptr %55, align 4, !tbaa !15
  %56 = load ptr, ptr %5, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %56, i64 6
  %58 = load ptr, ptr %57, align 8, !tbaa !9
  %59 = call i32 @atoi(ptr noundef %58) #10
  %60 = getelementptr inbounds %struct.TileParamSpec, ptr %11, i32 0, i32 0
  %61 = getelementptr inbounds [8 x i32], ptr %60, i64 0, i64 0
  store i32 %59, ptr %61, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #9
  store i32 0, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 92, ptr %13) #9
  %62 = load i32, ptr %6, align 4, !tbaa !11
  %63 = load i32, ptr %12, align 4, !tbaa !16
  %64 = load i32, ptr %7, align 4, !tbaa !5
  %65 = load i32, ptr %8, align 4, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind writable sret(%struct.TensorDesc) align 4 %13, i32 noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef %65, i32 noundef %66, i32 noundef %67)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %13, i64 92, i1 false), !tbaa.struct !18
  %68 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8 %15)
  store i32 %68, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  %69 = load i32, ptr %14, align 4, !tbaa !5
  %70 = load i32, ptr %6, align 4, !tbaa !11
  %71 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %69, i32 noundef %70, i32 noundef 0)
  store ptr %71, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %13, i64 92, i1 false), !tbaa.struct !18
  call void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind writable sret(%class.Tensor) align 8 %17, ptr noundef byval(%struct.TensorDesc) align 8 %18)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  %72 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef %19, i32 noundef 1)
          to label %73 unwind label %101

73:                                               ; preds = %3
  %74 = load ptr, ptr %16, align 8, !tbaa !9
  %75 = invoke noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %76 unwind label %101

76:                                               ; preds = %73
  %77 = zext i32 %75 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %72, ptr noundef %74, i64 noundef %77)
          to label %78 unwind label %101

78:                                               ; preds = %76
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #9
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %22, i32 noundef 1)
          to label %79 unwind label %105

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %11, i64 40, i1 false), !tbaa.struct !20
  %80 = invoke noundef i32 @_Z22tile_infer_output_sizeP6Tensor13TileParamSpecS0_P8ArchInfo(ptr noundef %17, ptr noundef byval(%struct.TileParamSpec) align 8 %24, ptr noundef %22, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %81 unwind label %109

81:                                               ; preds = %79
  store i32 %80, ptr %23, align 4, !tbaa !21
  %82 = load i32, ptr %23, align 4, !tbaa !21
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %117

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #9
  %85 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr %25, align 4, !tbaa !5
  %87 = load i32, ptr %25, align 4, !tbaa !5
  %88 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %87)
          to label %89 unwind label %113

89:                                               ; preds = %84
  %90 = load ptr, ptr @stdout, align 8, !tbaa !9
  %91 = invoke i32 @fflush(ptr noundef %90)
          to label %92 unwind label %113

92:                                               ; preds = %89
  %93 = load i32, ptr %23, align 4, !tbaa !21
  %94 = invoke ptr @ee2str(i32 noundef %93)
          to label %95 unwind label %113

95:                                               ; preds = %92
  %96 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %94)
          to label %97 unwind label %113

97:                                               ; preds = %95
  %98 = load ptr, ptr @stdout, align 8, !tbaa !9
  %99 = invoke i32 @fflush(ptr noundef %98)
          to label %100 unwind label %113

100:                                              ; preds = %97
  call void @exit(i32 noundef 1) #11
  unreachable

101:                                              ; preds = %76, %73, %3
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %20, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %21, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  br label %195

105:                                              ; preds = %78
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %20, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %21, align 4
  br label %194

109:                                              ; preds = %79
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %20, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %21, align 4
  br label %141

113:                                              ; preds = %97, %95, %92, %89, %84
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %20, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #9
  br label %141

117:                                              ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %118 unwind label %142

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #9
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %26, i32 noundef 1)
          to label %119 unwind label %146

119:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %11, i64 40, i1 false), !tbaa.struct !20
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  %120 = invoke noundef i32 @_Z4tile6Tensor13TileParamSpecS_S_P8ArchInfo(ptr noundef %28, ptr noundef byval(%struct.TileParamSpec) align 8 %29, ptr noundef %30, ptr noundef %31, ptr noundef @_ZL15UT_CPU_ARCHINFO)
          to label %121 unwind label %150

121:                                              ; preds = %119
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  store i32 %120, ptr %27, align 4, !tbaa !21
  %122 = load i32, ptr %27, align 4, !tbaa !21
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %158

124:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #9
  %125 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %126 = trunc i64 %125 to i32
  store i32 %126, ptr %32, align 4, !tbaa !5
  %127 = load i32, ptr %32, align 4, !tbaa !5
  %128 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %127)
          to label %129 unwind label %154

129:                                              ; preds = %124
  %130 = load ptr, ptr @stdout, align 8, !tbaa !9
  %131 = invoke i32 @fflush(ptr noundef %130)
          to label %132 unwind label %154

132:                                              ; preds = %129
  %133 = load i32, ptr %27, align 4, !tbaa !21
  %134 = invoke ptr @ee2str(i32 noundef %133)
          to label %135 unwind label %154

135:                                              ; preds = %132
  %136 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %134)
          to label %137 unwind label %154

137:                                              ; preds = %135
  %138 = load ptr, ptr @stdout, align 8, !tbaa !9
  %139 = invoke i32 @fflush(ptr noundef %138)
          to label %140 unwind label %154

140:                                              ; preds = %137
  call void @exit(i32 noundef 1) #11
  unreachable

141:                                              ; preds = %113, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %193

142:                                              ; preds = %117
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %20, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %21, align 4
  br label %193

146:                                              ; preds = %118
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %20, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %21, align 4
  br label %192

150:                                              ; preds = %119
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %20, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %21, align 4
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #9
  br label %181

154:                                              ; preds = %137, %135, %132, %129, %124
  %155 = landingpad { ptr, i32 }
          cleanup
  %156 = extractvalue { ptr, i32 } %155, 0
  store ptr %156, ptr %20, align 8
  %157 = extractvalue { ptr, i32 } %155, 1
  store i32 %157, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #9
  br label %181

158:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  %159 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %160 unwind label %182

160:                                              ; preds = %158
  %161 = load i32, ptr %14, align 4, !tbaa !5
  %162 = getelementptr inbounds %struct.TileParamSpec, ptr %11, i32 0, i32 0
  %163 = getelementptr inbounds [8 x i32], ptr %162, i64 0, i64 0
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = mul i32 %161, %164
  %166 = icmp eq i32 %159, %165
  br i1 %166, label %190, label %167

167:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #9
  %168 = call i64 (i64, ...) @syscall(i64 noundef 186) #9
  %169 = trunc i64 %168 to i32
  store i32 %169, ptr %33, align 4, !tbaa !5
  %170 = load i32, ptr %33, align 4, !tbaa !5
  %171 = invoke i32 (ptr, ...) @printf(ptr noundef @.str, i32 noundef %170)
          to label %172 unwind label %186

172:                                              ; preds = %167
  %173 = load ptr, ptr @stdout, align 8, !tbaa !9
  %174 = invoke i32 @fflush(ptr noundef %173)
          to label %175 unwind label %186

175:                                              ; preds = %172
  %176 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2)
          to label %177 unwind label %186

177:                                              ; preds = %175
  %178 = load ptr, ptr @stdout, align 8, !tbaa !9
  %179 = invoke i32 @fflush(ptr noundef %178)
          to label %180 unwind label %186

180:                                              ; preds = %177
  call void @exit(i32 noundef 1) #11
  unreachable

181:                                              ; preds = %154, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #9
  br label %191

182:                                              ; preds = %158
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %20, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %21, align 4
  br label %191

186:                                              ; preds = %177, %175, %172, %167
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %20, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #9
  br label %191

190:                                              ; preds = %160
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #9
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  ret i32 0

191:                                              ; preds = %186, %182, %181
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #9
  br label %192

192:                                              ; preds = %191, %146
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #9
  br label %193

193:                                              ; preds = %192, %142, %141
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #9
  br label %194

194:                                              ; preds = %193, %105
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #9
  br label %195

195:                                              ; preds = %194, %101
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 92, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %196

196:                                              ; preds = %195
  %197 = load ptr, ptr %20, align 8
  %198 = load i32, ptr %21, align 4
  %199 = insertvalue { ptr, i32 } poison, ptr %197, 0
  %200 = insertvalue { ptr, i32 } %199, i32 %198, 1
  resume { ptr, i32 } %200
}

; 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 willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind noalias writable sret(%class.Tensor) align 8, ptr noundef byval(%struct.TensorDesc) align 8) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) #5

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

; 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 #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare noundef i32 @_Z22tile_infer_output_sizeP6Tensor13TileParamSpecS0_P8ArchInfo(ptr noundef, ptr noundef byval(%struct.TileParamSpec) align 8, ptr noundef, ptr noundef) #6

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

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

declare i32 @fflush(ptr noundef) #6

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

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

; 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 @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

declare noundef i32 @_Z4tile6Tensor13TileParamSpecS_S_P8ArchInfo(ptr noundef, ptr noundef byval(%struct.TileParamSpec) align 8, ptr noundef, ptr noundef, ptr noundef) #6

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

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 willreturn memory(read) 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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { "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 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS8DataType", !7, i64 0}
!13 = !{!14, !6, i64 36}
!14 = !{!"_ZTS13TileParamSpec", !7, i64 0, !6, i64 32, !6, i64 36}
!15 = !{!14, !6, i64 32}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTS10DataFormat", !7, i64 0}
!18 = !{i64 0, i64 4, !11, i64 4, i64 4, !16, i64 8, i64 4, !5, i64 12, i64 80, !19}
!19 = !{!7, !7, i64 0}
!20 = !{i64 0, i64 32, !19, i64 32, i64 4, !5, i64 36, i64 4, !5}
!21 = !{!22, !22, i64 0}
!22 = !{!"_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.ArchInfo = type { i32, ptr }
%struct.TensorDesc = type { i32, i32, i32, [20 x i32] }
%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.TileParamSpec = type { [8 x i32], i32, i32 }

@_ZL15UT_CPU_ARCHINFO = external hidden global %struct.ArchInfo, align 8
@.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
@.str.2 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z8tileTestiPPc8DataType(i32 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.TensorDesc, align 8
  %5 = alloca %class.Tensor, align 8
  %6 = alloca %class.Tensor, align 8
  %7 = alloca %class.Tensor, align 8
  %8 = alloca %struct.TileParamSpec, align 8
  %9 = alloca %class.Tensor, align 8
  %10 = alloca %class.Tensor, align 8
  %11 = alloca %struct.TileParamSpec, align 8
  %12 = alloca %class.Tensor, align 8
  %13 = alloca %class.Tensor, align 8
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = tail call i32 @atoi(ptr nocapture noundef %15) #9
  %17 = getelementptr inbounds i8, ptr %1, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = tail call i32 @atoi(ptr nocapture noundef %18) #9
  %20 = getelementptr inbounds i8, ptr %1, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = tail call i32 @atoi(ptr nocapture noundef %21) #9
  %23 = getelementptr inbounds i8, ptr %1, i64 32
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = tail call i32 @atoi(ptr nocapture noundef %24) #9
  %26 = getelementptr inbounds i8, ptr %1, i64 40
  %27 = load ptr, ptr %26, align 8, !tbaa !5
  %28 = tail call i32 @atoi(ptr nocapture noundef %27) #9
  %29 = getelementptr inbounds i8, ptr %1, i64 48
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  %31 = tail call i32 @atoi(ptr nocapture noundef %30) #9
  call void @llvm.lifetime.start.p0(i64 92, ptr nonnull %4) #10
  call void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind nonnull writable sret(%struct.TensorDesc) align 4 %4, i32 noundef %2, i32 noundef 0, i32 noundef %16, i32 noundef %19, i32 noundef %22, i32 noundef %25)
  %32 = call noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
  %33 = call noundef ptr @_Z10ut_input_vj8DataType14UT_RANDOM_TYPE(i32 noundef %32, i32 noundef %2, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind nonnull writable sret(%class.Tensor) align 8 %5, ptr noundef nonnull byval(%struct.TensorDesc) align 8 %4)
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  %34 = invoke noundef ptr @_Z19get_ptr_from_tensor6Tensor4Arch(ptr noundef nonnull %6, i32 noundef 1)
          to label %35 unwind label %53

35:                                               ; preds = %3
  %36 = invoke noundef i32 @_ZN6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %37 unwind label %53

37:                                               ; preds = %35
  %38 = zext i32 %36 to i64
  invoke void @_Z10UNI_MEMCPYPvPKvm(ptr noundef %34, ptr noundef %33, i64 noundef %38)
          to label %39 unwind label %53

39:                                               ; preds = %37
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #10
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 1)
          to label %40 unwind label %55

40:                                               ; preds = %39
  store i32 %31, ptr %8, align 8
  %.sroa.714.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 32
  store i32 1, ptr %.sroa.714.0..sroa_idx, align 8, !tbaa !9
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %8, i64 36
  store i32 %28, ptr %.sroa.8.0..sroa_idx, align 4, !tbaa !9
  %41 = invoke noundef i32 @_Z22tile_infer_output_sizeP6Tensor13TileParamSpecS0_P8ArchInfo(ptr noundef nonnull %5, ptr noundef nonnull byval(%struct.TileParamSpec) align 8 %8, ptr noundef nonnull %7, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %42 unwind label %57

42:                                               ; preds = %40
  %.not = icmp eq i32 %41, 0
  br i1 %.not, label %59, label %43

43:                                               ; preds = %42
  %44 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %45 = trunc i64 %44 to i32
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %45)
  %47 = load ptr, ptr @stdout, align 8, !tbaa !5
  %48 = call i32 @fflush(ptr noundef %47)
  %49 = call ptr @ee2str(i32 noundef %41)
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %49)
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %52 = call i32 @fflush(ptr noundef %51)
  call void @exit(i32 noundef 1) #11
  unreachable

53:                                               ; preds = %37, %35, %3
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #10
  br label %101

55:                                               ; preds = %39
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %100

57:                                               ; preds = %40
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %99

59:                                               ; preds = %42
  invoke void @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %60 unwind label %74

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #10
  invoke void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32) %9, i32 noundef 1)
          to label %61 unwind label %76

61:                                               ; preds = %60
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  store i32 %31, ptr %11, align 8
  %.sroa.714.0..sroa_idx15 = getelementptr inbounds i8, ptr %11, i64 32
  store i32 1, ptr %.sroa.714.0..sroa_idx15, align 8, !tbaa !9
  %.sroa.8.0..sroa_idx17 = getelementptr inbounds i8, ptr %11, i64 36
  store i32 %28, ptr %.sroa.8.0..sroa_idx17, align 4, !tbaa !9
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @_ZN6TensorC2ERKS_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  %62 = invoke noundef i32 @_Z4tile6Tensor13TileParamSpecS_S_P8ArchInfo(ptr noundef nonnull %10, ptr noundef nonnull byval(%struct.TileParamSpec) align 8 %11, ptr noundef nonnull %12, ptr noundef nonnull %13, ptr noundef nonnull @_ZL15UT_CPU_ARCHINFO)
          to label %63 unwind label %78

63:                                               ; preds = %61
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  %.not38 = icmp eq i32 %62, 0
  br i1 %.not38, label %80, label %64

64:                                               ; preds = %63
  %65 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %66 = trunc i64 %65 to i32
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %66)
  %68 = load ptr, ptr @stdout, align 8, !tbaa !5
  %69 = call i32 @fflush(ptr noundef %68)
  %70 = call ptr @ee2str(i32 noundef %62)
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef %70)
  %72 = load ptr, ptr @stdout, align 8, !tbaa !5
  %73 = call i32 @fflush(ptr noundef %72)
  call void @exit(i32 noundef 1) #11
  unreachable

74:                                               ; preds = %59
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %99

76:                                               ; preds = %60
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %98

78:                                               ; preds = %61
  %79 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %97

80:                                               ; preds = %63
  %81 = invoke noundef i32 @_ZN6Tensor6lengthEv(ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %82 unwind label %94

82:                                               ; preds = %80
  %83 = mul i32 %32, %31
  %84 = icmp eq i32 %81, %83
  br i1 %84, label %96, label %85

85:                                               ; preds = %82
  %86 = call i64 (i64, ...) @syscall(i64 noundef 186) #10
  %87 = trunc i64 %86 to i32
  %88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %87)
  %89 = load ptr, ptr @stdout, align 8, !tbaa !5
  %90 = call i32 @fflush(ptr noundef %89)
  %91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %92 = load ptr, ptr @stdout, align 8, !tbaa !5
  %93 = call i32 @fflush(ptr noundef %92)
  call void @exit(i32 noundef 1) #11
  unreachable

94:                                               ; preds = %80
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %97

96:                                               ; preds = %82
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %4) #10
  ret i32 0

97:                                               ; preds = %94, %78
  %.pn = phi { ptr, i32 } [ %95, %94 ], [ %79, %78 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #10
  br label %98

98:                                               ; preds = %97, %76
  %.pn.pn = phi { ptr, i32 } [ %.pn, %97 ], [ %77, %76 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #10
  br label %99

99:                                               ; preds = %98, %74, %57
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %98 ], [ %75, %74 ], [ %58, %57 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %100

100:                                              ; preds = %99, %55
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %99 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #10
  br label %101

101:                                              ; preds = %100, %53
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %100 ], [ %54, %53 ]
  call void @_ZN6TensorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 92, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; 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 nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_Z9tensor4df8DataType10DataFormatjjjj(ptr dead_on_unwind noalias writable sret(%struct.TensorDesc) align 4, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z17tensorNumElements10TensorDesc(ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Tensor11alloc_sizedIL10MemoryType1EEES_10TensorDesc(ptr dead_on_unwind noalias writable sret(%class.Tensor) align 8, ptr noundef byval(%struct.TensorDesc) align 8) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z10UNI_MEMCPYPvPKvm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

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

; 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 #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6TensorC2E10MemoryType(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

declare noundef i32 @_Z22tile_infer_output_sizeP6Tensor13TileParamSpecS0_P8ArchInfo(ptr noundef, ptr noundef byval(%struct.TileParamSpec) align 8, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

; 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 @_ZN6Tensor5allocEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

declare noundef i32 @_Z4tile6Tensor13TileParamSpecS_S_P8ArchInfo(ptr noundef, ptr noundef byval(%struct.TileParamSpec) align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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 nofree nounwind willreturn memory(read) 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 = { 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 #4 = { 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 #5 = { "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 "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 = { 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 #8 = { 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 #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind }
attributes #11 = { 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 = !{!"int", !7, i64 0}


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