; LLVM IR from aferikoglou/GenHLSOptimizer :: dataset/rodinia_streamcluster_1_tiling_0 (streamcluster)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @load(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @compute(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @store(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @workload(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) #0 {
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %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 ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  %23 = alloca [200 x float], align 16
  %24 = alloca [1024 x i32], align 16
  %25 = alloca [1024 x float], align 16
  %26 = alloca [1024 x i8], align 16
  %27 = alloca [1 x float], align 4
  %28 = alloca [256 x i32], align 16
  %29 = alloca [256 x float], align 16
  %30 = alloca [256 x float], align 16
  %31 = alloca [51200 x float], align 16
  %32 = alloca [256 x float], align 16
  %33 = alloca i32, align 4
  store ptr %0, ptr %12, align 8, !tbaa !5
  store ptr %1, ptr %13, align 8, !tbaa !5
  store ptr %2, ptr %14, align 8, !tbaa !5
  store ptr %3, ptr %15, align 8, !tbaa !5
  store ptr %4, ptr %16, align 8, !tbaa !5
  store ptr %5, ptr %17, align 8, !tbaa !5
  store ptr %6, ptr %18, align 8, !tbaa !5
  store ptr %7, ptr %19, align 8, !tbaa !5
  store i32 %8, ptr %20, align 4, !tbaa !9
  store ptr %9, ptr %21, align 8, !tbaa !5
  store i32 %10, ptr %22, align 4, !tbaa !9
  br label %34

34:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 800, ptr %23) #3
  br label %35

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4096, ptr %24) #3
  br label %36

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4096, ptr %25) #3
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1024, ptr %26) #3
  br label %38

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #3
  %39 = load ptr, ptr %21, align 8, !tbaa !5
  %40 = getelementptr inbounds float, ptr %39, i64 0
  %41 = load float, ptr %40, align 4, !tbaa !11
  %42 = getelementptr inbounds [1 x float], ptr %27, i64 0, i64 0
  store float %41, ptr %42, align 4, !tbaa !11
  br label %43

43:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 1024, ptr %28) #3
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1024, ptr %29) #3
  br label %45

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1024, ptr %30) #3
  br label %46

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 204800, ptr %31) #3
  br label %47

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 1024, ptr %32) #3
  %48 = getelementptr inbounds [1024 x float], ptr %25, i64 0, i64 0
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %48, ptr align 4 %49, i64 4096, i1 false)
  %50 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  %51 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %50, ptr align 1 %51, i64 1024, i1 false)
  %52 = getelementptr inbounds [200 x float], ptr %23, i64 0, i64 0
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %52, ptr align 4 %53, i64 800, i1 false)
  %54 = getelementptr inbounds [1024 x i32], ptr %24, i64 0, i64 0
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %54, ptr align 4 %55, i64 4096, i1 false)
  br label %56

56:                                               ; preds = %47
  br label %57

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %84, %57
  %59 = load i32, ptr %33, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 1024
  br i1 %60, label %62, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  br label %87

62:                                               ; preds = %58
  %63 = load i32, ptr %33, align 4, !tbaa !9
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = getelementptr inbounds [51200 x float], ptr %31, i64 0, i64 0
  %69 = getelementptr inbounds [256 x float], ptr %30, i64 0, i64 0
  %70 = getelementptr inbounds [256 x float], ptr %29, i64 0, i64 0
  %71 = getelementptr inbounds [256 x i32], ptr %28, i64 0, i64 0
  call void @load(i32 noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %69, ptr noundef %70, ptr noundef %71)
  %72 = load i32, ptr %20, align 4, !tbaa !9
  %73 = load i32, ptr %33, align 4, !tbaa !9
  %74 = getelementptr inbounds [51200 x float], ptr %31, i64 0, i64 0
  %75 = getelementptr inbounds [256 x float], ptr %30, i64 0, i64 0
  %76 = getelementptr inbounds [200 x float], ptr %23, i64 0, i64 0
  %77 = getelementptr inbounds [256 x float], ptr %29, i64 0, i64 0
  %78 = getelementptr inbounds [256 x i32], ptr %28, i64 0, i64 0
  %79 = getelementptr inbounds [1024 x i32], ptr %24, i64 0, i64 0
  %80 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  %81 = getelementptr inbounds [1 x float], ptr %27, i64 0, i64 0
  %82 = getelementptr inbounds [1024 x float], ptr %25, i64 0, i64 0
  %83 = getelementptr inbounds [256 x float], ptr %32, i64 0, i64 0
  call void @compute(i32 noundef %72, i32 noundef %73, ptr noundef %74, ptr noundef %75, ptr noundef %76, ptr noundef %77, ptr noundef %78, ptr noundef %79, ptr noundef %80, ptr noundef %81, ptr noundef %82, ptr noundef %83)
  br label %84

84:                                               ; preds = %62
  %85 = load i32, ptr %33, align 4, !tbaa !9
  %86 = add nsw i32 %85, 256
  store i32 %86, ptr %33, align 4, !tbaa !9
  br label %58, !llvm.loop !13

87:                                               ; preds = %61
  %88 = load i32, ptr %20, align 4, !tbaa !9
  %89 = load i32, ptr %22, align 4, !tbaa !9
  %90 = load ptr, ptr %19, align 8, !tbaa !5
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = load ptr, ptr %21, align 8, !tbaa !5
  %93 = getelementptr inbounds [1024 x float], ptr %25, i64 0, i64 0
  %94 = getelementptr inbounds [1024 x i8], ptr %26, i64 0, i64 0
  %95 = getelementptr inbounds [1 x float], ptr %27, i64 0, i64 0
  call void @store(i32 noundef %88, i32 noundef %89, ptr noundef %90, ptr noundef %91, ptr noundef %92, ptr noundef %93, ptr noundef %94, ptr noundef %95)
  call void @llvm.lifetime.end.p0(i64 1024, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 204800, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4096, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 4096, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 800, ptr %23) #3
  ret void
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @load(i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @compute(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @store(i32 noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @workload(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef readonly %3, ptr noundef %4, ptr nocapture noundef readonly %5, ptr noundef %6, ptr noundef %7, i32 noundef %8, ptr noundef %9, i32 noundef %10) local_unnamed_addr #0 {
  %12 = alloca [200 x float], align 16
  %13 = alloca [1024 x i32], align 16
  %14 = alloca [1024 x float], align 16
  %15 = alloca [1024 x i8], align 16
  %16 = alloca [1 x float], align 4
  %17 = alloca [256 x i32], align 16
  %18 = alloca [256 x float], align 16
  %19 = alloca [256 x float], align 16
  %20 = alloca [51200 x float], align 16
  %21 = alloca [256 x float], align 16
  call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 4096, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %15) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #3
  %22 = load float, ptr %9, align 4, !tbaa !5
  store float %22, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %17) #3
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %18) #3
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %19) #3
  call void @llvm.lifetime.start.p0(i64 204800, ptr nonnull %20) #3
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %21) #3
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %14, ptr noundef nonnull align 4 dereferenceable(4096) %7, i64 4096, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %15, ptr noundef nonnull align 1 dereferenceable(1024) %6, i64 1024, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(800) %12, ptr noundef nonnull align 4 dereferenceable(800) %3, i64 800, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(4096) %13, ptr noundef nonnull align 4 dereferenceable(4096) %5, i64 4096, i1 false)
  call void @load(i32 noundef 0, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %4, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %18, ptr noundef nonnull %17)
  call void @compute(i32 noundef %8, i32 noundef 0, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %12, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %14, ptr noundef nonnull %21)
  call void @load(i32 noundef 256, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %4, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %18, ptr noundef nonnull %17)
  call void @compute(i32 noundef %8, i32 noundef 256, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %12, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %14, ptr noundef nonnull %21)
  call void @load(i32 noundef 512, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %4, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %18, ptr noundef nonnull %17)
  call void @compute(i32 noundef %8, i32 noundef 512, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %12, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %14, ptr noundef nonnull %21)
  call void @load(i32 noundef 768, ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %4, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %18, ptr noundef nonnull %17)
  call void @compute(i32 noundef %8, i32 noundef 768, ptr noundef nonnull %20, ptr noundef nonnull %19, ptr noundef nonnull %12, ptr noundef nonnull %18, ptr noundef nonnull %17, ptr noundef nonnull %13, ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %14, ptr noundef nonnull %21)
  call void @store(i32 noundef %8, i32 noundef %10, ptr noundef %7, ptr noundef %6, ptr noundef nonnull %9, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %21) #3
  call void @llvm.lifetime.end.p0(i64 204800, ptr nonnull %20) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %19) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %17) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 4096, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %12) #3
  ret void
}

attributes #0 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass