; LLVM IR from ROCm/aomp :: test/smoke-fails/clang-298140/NPB_LU/sys (setparams)

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

@.str.66 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind uwtable
define dso_local void @write_cg_info(ptr noundef %0, i8 noundef signext %1) #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %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 ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store ptr @.str.78, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr @.str.79, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  store ptr @.str.80, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr @.str.81, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr @.str.82, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr @.str.83, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store ptr @.str.84, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store ptr @.str.85, ptr %16, align 8, !tbaa !5
  %17 = load i8, ptr %4, align 1, !tbaa !9
  %18 = sext i8 %17 to i32
  %19 = icmp eq i32 %18, 83
  br i1 %19, label %20, label %22

20:                                               ; preds = %2
  store i32 1400, ptr %5, align 4, !tbaa !10
  store i32 7, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %21, ptr %8, align 8, !tbaa !5
  br label %68

22:                                               ; preds = %2
  %23 = load i8, ptr %4, align 1, !tbaa !9
  %24 = sext i8 %23 to i32
  %25 = icmp eq i32 %24, 87
  br i1 %25, label %26, label %28

26:                                               ; preds = %22
  store i32 7000, ptr %5, align 4, !tbaa !10
  store i32 8, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %27, ptr %8, align 8, !tbaa !5
  br label %67

28:                                               ; preds = %22
  %29 = load i8, ptr %4, align 1, !tbaa !9
  %30 = sext i8 %29 to i32
  %31 = icmp eq i32 %30, 65
  br i1 %31, label %32, label %34

32:                                               ; preds = %28
  store i32 14000, ptr %5, align 4, !tbaa !10
  store i32 11, ptr %6, align 4, !tbaa !10
  store i32 15, ptr %7, align 4, !tbaa !10
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %33, ptr %8, align 8, !tbaa !5
  br label %66

34:                                               ; preds = %28
  %35 = load i8, ptr %4, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  %37 = icmp eq i32 %36, 66
  br i1 %37, label %38, label %40

38:                                               ; preds = %34
  store i32 75000, ptr %5, align 4, !tbaa !10
  store i32 13, ptr %6, align 4, !tbaa !10
  store i32 75, ptr %7, align 4, !tbaa !10
  %39 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %39, ptr %8, align 8, !tbaa !5
  br label %65

40:                                               ; preds = %34
  %41 = load i8, ptr %4, align 1, !tbaa !9
  %42 = sext i8 %41 to i32
  %43 = icmp eq i32 %42, 67
  br i1 %43, label %44, label %46

44:                                               ; preds = %40
  store i32 150000, ptr %5, align 4, !tbaa !10
  store i32 15, ptr %6, align 4, !tbaa !10
  store i32 75, ptr %7, align 4, !tbaa !10
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %45, ptr %8, align 8, !tbaa !5
  br label %64

46:                                               ; preds = %40
  %47 = load i8, ptr %4, align 1, !tbaa !9
  %48 = sext i8 %47 to i32
  %49 = icmp eq i32 %48, 68
  br i1 %49, label %50, label %52

50:                                               ; preds = %46
  store i32 1500000, ptr %5, align 4, !tbaa !10
  store i32 21, ptr %6, align 4, !tbaa !10
  store i32 100, ptr %7, align 4, !tbaa !10
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %51, ptr %8, align 8, !tbaa !5
  br label %63

52:                                               ; preds = %46
  %53 = load i8, ptr %4, align 1, !tbaa !9
  %54 = sext i8 %53 to i32
  %55 = icmp eq i32 %54, 69
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  store i32 9000000, ptr %5, align 4, !tbaa !10
  store i32 26, ptr %6, align 4, !tbaa !10
  store i32 100, ptr %7, align 4, !tbaa !10
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %57, ptr %8, align 8, !tbaa !5
  br label %62

58:                                               ; preds = %52
  %59 = load i8, ptr %4, align 1, !tbaa !9
  %60 = sext i8 %59 to i32
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.66, i32 noundef %60)
  call void @exit(i32 noundef 1) #6
  unreachable

62:                                               ; preds = %56
  br label %63

63:                                               ; preds = %62, %50
  br label %64

64:                                               ; preds = %63, %44
  br label %65

65:                                               ; preds = %64, %38
  br label %66

66:                                               ; preds = %65, %32
  br label %67

67:                                               ; preds = %66, %26
  br label %68

68:                                               ; preds = %67, %20
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = load i32, ptr %5, align 4, !tbaa !10
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.86, i32 noundef %70) #5
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = load i32, ptr %6, align 4, !tbaa !10
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str.87, i32 noundef %73) #5
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !10
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef @.str.88, i32 noundef %76) #5
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef @.str.89, ptr noundef %79) #5
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %81, ptr noundef @.str.90, ptr noundef %82) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 = { 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 = { nounwind }
attributes #6 = { 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/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !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"

@.str.66 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [20 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @write_cg_info(ptr nocapture noundef %0, i8 noundef signext %1) local_unnamed_addr #2 {
  switch i8 %1, label %9 [
    i8 83, label %12
    i8 87, label %3
    i8 65, label %4
    i8 66, label %5
    i8 67, label %6
    i8 68, label %7
    i8 69, label %8
  ]

3:                                                ; preds = %2
  br label %12

4:                                                ; preds = %2
  br label %12

5:                                                ; preds = %2
  br label %12

6:                                                ; preds = %2
  br label %12

7:                                                ; preds = %2
  br label %12

8:                                                ; preds = %2
  br label %12

9:                                                ; preds = %2
  %10 = sext i8 %1 to i32
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.66, i32 noundef %10)
  tail call void @exit(i32 noundef 1) #3
  unreachable

12:                                               ; preds = %2, %3, %5, %7, %8, %6, %4
  %.026 = phi ptr [ @.str.80, %3 ], [ @.str.81, %4 ], [ @.str.82, %5 ], [ @.str.83, %6 ], [ @.str.84, %7 ], [ @.str.85, %8 ], [ @.str.79, %2 ]
  %.025 = phi i32 [ 15, %3 ], [ 15, %4 ], [ 75, %5 ], [ 75, %6 ], [ 100, %7 ], [ 100, %8 ], [ 15, %2 ]
  %.024 = phi i32 [ 8, %3 ], [ 11, %4 ], [ 13, %5 ], [ 15, %6 ], [ 21, %7 ], [ 26, %8 ], [ 7, %2 ]
  %.0 = phi i32 [ 7000, %3 ], [ 14000, %4 ], [ 75000, %5 ], [ 150000, %6 ], [ 1500000, %7 ], [ 9000000, %8 ], [ 1400, %2 ]
  %13 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.86, i32 noundef %.0) #4
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.87, i32 noundef %.024) #4
  %15 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.88, i32 noundef %.025) #4
  %16 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.89, ptr noundef nonnull %.026) #4
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %0, ptr noundef nonnull @.str.90, ptr noundef nonnull @.str.78) #4
  ret void
}

attributes #0 = { 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 #1 = { 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 #2 = { 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 = { noreturn nounwind }
attributes #4 = { 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)"}


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