; LLVM IR from kdrag0n/fxdsp :: external/boost/libs/math/test/complex_test.ll (Z15test_boundariesv)

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

@_ZL10boundaries = external hidden global [13 x float], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #0 align 2

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

; 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 @_Z15test_boundariesf(float noundef) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15test_boundariesv() #2 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %2

2:                                                ; preds = %33, %0
  %3 = load i32, ptr %1, align 4, !tbaa !5
  %4 = zext i32 %3 to i64
  %5 = icmp ult i64 %4, 13
  br i1 %5, label %7, label %6

6:                                                ; preds = %2
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  br label %36

7:                                                ; preds = %2
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = zext i32 %8 to i64
  %10 = getelementptr inbounds [13 x float], ptr @_ZL10boundaries, i64 0, i64 %9
  %11 = load float, ptr %10, align 4, !tbaa !9
  call void @_Z15test_boundariesf(float noundef %11)
  %12 = load i32, ptr %1, align 4, !tbaa !5
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds [13 x float], ptr @_ZL10boundaries, i64 0, i64 %13
  %15 = load float, ptr %14, align 4, !tbaa !9
  %16 = call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #4
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = zext i32 %17 to i64
  %19 = getelementptr inbounds [13 x float], ptr @_ZL10boundaries, i64 0, i64 %18
  %20 = load float, ptr %19, align 4, !tbaa !9
  %21 = call float @llvm.fmuladd.f32(float %16, float %20, float %15)
  call void @_Z15test_boundariesf(float noundef %21)
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds [13 x float], ptr @_ZL10boundaries, i64 0, i64 %23
  %25 = load float, ptr %24, align 4, !tbaa !9
  %26 = call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #4
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = getelementptr inbounds [13 x float], ptr @_ZL10boundaries, i64 0, i64 %28
  %30 = load float, ptr %29, align 4, !tbaa !9
  %31 = fneg float %26
  %32 = call float @llvm.fmuladd.f32(float %31, float %30, float %25)
  call void @_Z15test_boundariesf(float noundef %32)
  br label %33

33:                                               ; preds = %7
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = add i32 %34, 1
  store i32 %35, ptr %1, align 4, !tbaa !5
  br label %2, !llvm.loop !11

36:                                               ; preds = %6
  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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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)"}
!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 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

@_ZL10boundaries = external hidden local_unnamed_addr global [13 x float], align 16

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z15test_boundariesf(float noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z15test_boundariesv() local_unnamed_addr #1 {
  %1 = load float, ptr @_ZL10boundaries, align 16, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %1)
  %2 = load float, ptr @_ZL10boundaries, align 16, !tbaa !5
  %3 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %4 = load float, ptr @_ZL10boundaries, align 16, !tbaa !5
  %5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %2)
  tail call void @_Z15test_boundariesf(float noundef %5)
  %6 = load float, ptr @_ZL10boundaries, align 16, !tbaa !5
  %7 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %8 = load float, ptr @_ZL10boundaries, align 16, !tbaa !5
  %9 = fneg float %7
  %10 = tail call float @llvm.fmuladd.f32(float %9, float %8, float %6)
  tail call void @_Z15test_boundariesf(float noundef %10)
  %11 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 4), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %11)
  %12 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 4), align 4, !tbaa !5
  %13 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %14 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 4), align 4, !tbaa !5
  %15 = tail call float @llvm.fmuladd.f32(float %13, float %14, float %12)
  tail call void @_Z15test_boundariesf(float noundef %15)
  %16 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 4), align 4, !tbaa !5
  %17 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %18 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 4), align 4, !tbaa !5
  %19 = fneg float %17
  %20 = tail call float @llvm.fmuladd.f32(float %19, float %18, float %16)
  tail call void @_Z15test_boundariesf(float noundef %20)
  %21 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 8), align 8, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %21)
  %22 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 8), align 8, !tbaa !5
  %23 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %24 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 8), align 8, !tbaa !5
  %25 = tail call float @llvm.fmuladd.f32(float %23, float %24, float %22)
  tail call void @_Z15test_boundariesf(float noundef %25)
  %26 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 8), align 8, !tbaa !5
  %27 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %28 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 8), align 8, !tbaa !5
  %29 = fneg float %27
  %30 = tail call float @llvm.fmuladd.f32(float %29, float %28, float %26)
  tail call void @_Z15test_boundariesf(float noundef %30)
  %31 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 12), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %31)
  %32 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 12), align 4, !tbaa !5
  %33 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %34 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 12), align 4, !tbaa !5
  %35 = tail call float @llvm.fmuladd.f32(float %33, float %34, float %32)
  tail call void @_Z15test_boundariesf(float noundef %35)
  %36 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 12), align 4, !tbaa !5
  %37 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %38 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 12), align 4, !tbaa !5
  %39 = fneg float %37
  %40 = tail call float @llvm.fmuladd.f32(float %39, float %38, float %36)
  tail call void @_Z15test_boundariesf(float noundef %40)
  %41 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 16), align 16, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %41)
  %42 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 16), align 16, !tbaa !5
  %43 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %44 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 16), align 16, !tbaa !5
  %45 = tail call float @llvm.fmuladd.f32(float %43, float %44, float %42)
  tail call void @_Z15test_boundariesf(float noundef %45)
  %46 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 16), align 16, !tbaa !5
  %47 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %48 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 16), align 16, !tbaa !5
  %49 = fneg float %47
  %50 = tail call float @llvm.fmuladd.f32(float %49, float %48, float %46)
  tail call void @_Z15test_boundariesf(float noundef %50)
  %51 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 20), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %51)
  %52 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 20), align 4, !tbaa !5
  %53 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %54 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 20), align 4, !tbaa !5
  %55 = tail call float @llvm.fmuladd.f32(float %53, float %54, float %52)
  tail call void @_Z15test_boundariesf(float noundef %55)
  %56 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 20), align 4, !tbaa !5
  %57 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %58 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 20), align 4, !tbaa !5
  %59 = fneg float %57
  %60 = tail call float @llvm.fmuladd.f32(float %59, float %58, float %56)
  tail call void @_Z15test_boundariesf(float noundef %60)
  %61 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 24), align 8, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %61)
  %62 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 24), align 8, !tbaa !5
  %63 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %64 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 24), align 8, !tbaa !5
  %65 = tail call float @llvm.fmuladd.f32(float %63, float %64, float %62)
  tail call void @_Z15test_boundariesf(float noundef %65)
  %66 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 24), align 8, !tbaa !5
  %67 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %68 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 24), align 8, !tbaa !5
  %69 = fneg float %67
  %70 = tail call float @llvm.fmuladd.f32(float %69, float %68, float %66)
  tail call void @_Z15test_boundariesf(float noundef %70)
  %71 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 28), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %71)
  %72 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 28), align 4, !tbaa !5
  %73 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %74 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 28), align 4, !tbaa !5
  %75 = tail call float @llvm.fmuladd.f32(float %73, float %74, float %72)
  tail call void @_Z15test_boundariesf(float noundef %75)
  %76 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 28), align 4, !tbaa !5
  %77 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %78 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 28), align 4, !tbaa !5
  %79 = fneg float %77
  %80 = tail call float @llvm.fmuladd.f32(float %79, float %78, float %76)
  tail call void @_Z15test_boundariesf(float noundef %80)
  %81 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 32), align 16, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %81)
  %82 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 32), align 16, !tbaa !5
  %83 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %84 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 32), align 16, !tbaa !5
  %85 = tail call float @llvm.fmuladd.f32(float %83, float %84, float %82)
  tail call void @_Z15test_boundariesf(float noundef %85)
  %86 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 32), align 16, !tbaa !5
  %87 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %88 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 32), align 16, !tbaa !5
  %89 = fneg float %87
  %90 = tail call float @llvm.fmuladd.f32(float %89, float %88, float %86)
  tail call void @_Z15test_boundariesf(float noundef %90)
  %91 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 36), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %91)
  %92 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 36), align 4, !tbaa !5
  %93 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %94 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 36), align 4, !tbaa !5
  %95 = tail call float @llvm.fmuladd.f32(float %93, float %94, float %92)
  tail call void @_Z15test_boundariesf(float noundef %95)
  %96 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 36), align 4, !tbaa !5
  %97 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %98 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 36), align 4, !tbaa !5
  %99 = fneg float %97
  %100 = tail call float @llvm.fmuladd.f32(float %99, float %98, float %96)
  tail call void @_Z15test_boundariesf(float noundef %100)
  %101 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 40), align 8, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %101)
  %102 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 40), align 8, !tbaa !5
  %103 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %104 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 40), align 8, !tbaa !5
  %105 = tail call float @llvm.fmuladd.f32(float %103, float %104, float %102)
  tail call void @_Z15test_boundariesf(float noundef %105)
  %106 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 40), align 8, !tbaa !5
  %107 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %108 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 40), align 8, !tbaa !5
  %109 = fneg float %107
  %110 = tail call float @llvm.fmuladd.f32(float %109, float %108, float %106)
  tail call void @_Z15test_boundariesf(float noundef %110)
  %111 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 44), align 4, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %111)
  %112 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 44), align 4, !tbaa !5
  %113 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %114 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 44), align 4, !tbaa !5
  %115 = tail call float @llvm.fmuladd.f32(float %113, float %114, float %112)
  tail call void @_Z15test_boundariesf(float noundef %115)
  %116 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 44), align 4, !tbaa !5
  %117 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %118 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 44), align 4, !tbaa !5
  %119 = fneg float %117
  %120 = tail call float @llvm.fmuladd.f32(float %119, float %118, float %116)
  tail call void @_Z15test_boundariesf(float noundef %120)
  %121 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 48), align 16, !tbaa !5
  tail call void @_Z15test_boundariesf(float noundef %121)
  %122 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 48), align 16, !tbaa !5
  %123 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %124 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 48), align 16, !tbaa !5
  %125 = tail call float @llvm.fmuladd.f32(float %123, float %124, float %122)
  tail call void @_Z15test_boundariesf(float noundef %125)
  %126 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 48), align 16, !tbaa !5
  %127 = tail call noundef float @_ZNSt14numeric_limitsIfE7epsilonEv() #3
  %128 = load float, ptr getelementptr inbounds (i8, ptr @_ZL10boundaries, i64 48), align 16, !tbaa !5
  %129 = fneg float %127
  %130 = tail call float @llvm.fmuladd.f32(float %129, float %128, float %126)
  tail call void @_Z15test_boundariesf(float noundef %130)
  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 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 #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass