; LLVM IR from AdaptiveCpp/AdaptiveCpp :: tests/pcuda/pcuda_test_suite.ll (ZN5boost9unit_test9test_unit17increase_exp_failEm)

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

%"class.boost::unit_test::test_unit" = type { i32, %"class.boost::unit_test::basic_cstring", %"class.boost::unit_test::basic_cstring", i64, %"class.boost::unit_test::test_unit::readonly_property62", %"class.boost::unit_test::test_unit::readonly_property63", %"class.boost::unit_test::test_unit::readonly_property66", %"class.boost::unit_test::test_unit::readonly_property64", %"class.boost::unit_test::test_unit::readonly_property69", %"class.boost::unit_test::readwrite_property", %"class.boost::unit_test::readwrite_property", %"class.boost::unit_test::readwrite_property.20", %"class.boost::unit_test::readwrite_property.22", %"class.boost::unit_test::readwrite_property.23", %"class.boost::unit_test::readwrite_property.23", %"class.boost::unit_test::readwrite_property.22", %"class.boost::unit_test::readwrite_property.25", %"class.boost::unit_test::readwrite_property.32" }
%"class.boost::unit_test::basic_cstring" = type { ptr, ptr }
%"class.boost::unit_test::test_unit::readonly_property62" = type { %"class.boost::unit_test::readonly_property" }
%"class.boost::unit_test::readonly_property" = type { %"class.boost::unit_test::class_property" }
%"class.boost::unit_test::class_property" = type { i64 }
%"class.boost::unit_test::test_unit::readonly_property63" = type { %"class.boost::unit_test::readonly_property" }
%"class.boost::unit_test::test_unit::readonly_property66" = type { %"class.boost::unit_test::readonly_property.0" }
%"class.boost::unit_test::readonly_property.0" = type { %"class.boost::unit_test::class_property.1" }
%"class.boost::unit_test::class_property.1" = type { %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::unit_test::test_unit::readonly_property64" = type { %"class.boost::unit_test::readonly_property.5" }
%"class.boost::unit_test::readonly_property.5" = type { %"class.boost::unit_test::class_property.6" }
%"class.boost::unit_test::class_property.6" = type { %"class.std::vector.7" }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::unit_test::test_unit::readonly_property69" = type { %"class.boost::unit_test::readonly_property.12" }
%"class.boost::unit_test::readonly_property.12" = type { %"class.boost::unit_test::class_property.13" }
%"class.boost::unit_test::class_property.13" = type { %"class.std::vector.14" }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<boost::function<boost::test_tools::assertion_result (unsigned long)>, std::allocator<boost::function<boost::test_tools::assertion_result (unsigned long)>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::function<boost::test_tools::assertion_result (unsigned long)>, std::allocator<boost::function<boost::test_tools::assertion_result (unsigned long)>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::function<boost::test_tools::assertion_result (unsigned long)>, std::allocator<boost::function<boost::test_tools::assertion_result (unsigned long)>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::function<boost::test_tools::assertion_result (unsigned long)>, std::allocator<boost::function<boost::test_tools::assertion_result (unsigned long)>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::unit_test::readwrite_property" = type { %"class.boost::unit_test::class_property.19" }
%"class.boost::unit_test::class_property.19" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.boost::unit_test::readwrite_property.20" = type { %"class.boost::unit_test::class_property.21" }
%"class.boost::unit_test::class_property.21" = type { i32 }
%"class.boost::unit_test::readwrite_property.23" = type { %"class.boost::unit_test::class_property.24" }
%"class.boost::unit_test::class_property.24" = type { i32 }
%"class.boost::unit_test::readwrite_property.22" = type { %"class.boost::unit_test::class_property" }
%"class.boost::unit_test::readwrite_property.25" = type { %"class.boost::unit_test::class_property.26" }
%"class.boost::unit_test::class_property.26" = type { %"class.std::vector.27" }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::decorator::base>, std::allocator<boost::shared_ptr<boost::unit_test::decorator::base>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::decorator::base>, std::allocator<boost::shared_ptr<boost::unit_test::decorator::base>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::decorator::base>, std::allocator<boost::shared_ptr<boost::unit_test::decorator::base>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::decorator::base>, std::allocator<boost::shared_ptr<boost::unit_test::decorator::base>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::unit_test::readwrite_property.32" = type { %"class.boost::unit_test::class_property.33" }
%"class.boost::unit_test::class_property.33" = type { %"class.std::vector.34" }
%"class.std::vector.34" = type { %"struct.std::_Vector_base.35" }
%"struct.std::_Vector_base.35" = type { %"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::test_unit_fixture>, std::allocator<boost::shared_ptr<boost::unit_test::test_unit_fixture>>>::_Vector_impl" }
%"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::test_unit_fixture>, std::allocator<boost::shared_ptr<boost::unit_test::test_unit_fixture>>>::_Vector_impl" = type { %"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::test_unit_fixture>, std::allocator<boost::shared_ptr<boost::unit_test::test_unit_fixture>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<boost::shared_ptr<boost::unit_test::test_unit_fixture>, std::allocator<boost::shared_ptr<boost::unit_test::test_unit_fixture>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN5boost9unit_testL16INV_TEST_UNIT_IDE = external hidden constant i64, align 8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5boost9unit_testneImEEbRKNS0_14class_propertyIT_EERKS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5boost9unit_test14class_propertyImEcvRKmEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test9test_unit17increase_exp_failEm(ptr noundef nonnull align 8 dereferenceable(280) %0, i64 noundef %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %5 = load ptr, ptr %3, align 8
  %6 = load i64, ptr %4, align 8, !tbaa !9
  %7 = getelementptr inbounds %"class.boost::unit_test::test_unit", ptr %5, i32 0, i32 12
  %8 = getelementptr inbounds %"class.boost::unit_test::class_property", ptr %7, i32 0, i32 0
  %9 = load i64, ptr %8, align 8, !tbaa !11
  %10 = add i64 %9, %6
  store i64 %10, ptr %8, align 8, !tbaa !11
  %11 = getelementptr inbounds %"class.boost::unit_test::test_unit", ptr %5, i32 0, i32 5
  %12 = call noundef zeroext i1 @_ZN5boost9unit_testneImEEbRKNS0_14class_propertyIT_EERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) @_ZN5boost9unit_testL16INV_TEST_UNIT_IDE)
  br i1 %12, label %13, label %20

13:                                               ; preds = %2
  %14 = getelementptr inbounds %"class.boost::unit_test::test_unit", ptr %5, i32 0, i32 5
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5boost9unit_test14class_propertyImEcvRKmEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = load i64, ptr %15, align 8, !tbaa !9
  %17 = call noundef nonnull align 8 dereferenceable(384) ptr @_ZN5boost9unit_test9framework3getINS0_10test_suiteEEERT_m(i64 noundef %16)
  %18 = getelementptr inbounds i8, ptr %17, i64 8
  %19 = load i64, ptr %4, align 8, !tbaa !9
  call void @_ZN5boost9unit_test9test_unit17increase_exp_failEm(ptr noundef nonnull align 8 dereferenceable(280) %18, i64 noundef %19)
  br label %20

20:                                               ; preds = %13, %2
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(384) ptr @_ZN5boost9unit_test9framework3getINS0_10test_suiteEEERT_m(i64 noundef) #3

attributes #0 = { 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 #1 = { 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 #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 = { 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" }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN5boost9unit_test14class_propertyImEE", !10, 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"

@_ZN5boost9unit_testL16INV_TEST_UNIT_IDE = external hidden constant i64, align 8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN5boost9unit_testneImEEbRKNS0_14class_propertyIT_EERKS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5boost9unit_test14class_propertyImEcvRKmEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5boost9unit_test9test_unit17increase_exp_failEm(ptr noundef nonnull align 8 dereferenceable(280) %0, i64 noundef %1) local_unnamed_addr #2 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 208
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = add i64 %4, %1
  store i64 %5, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  %7 = tail call noundef zeroext i1 @_ZN5boost9unit_testneImEEbRKNS0_14class_propertyIT_EERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) @_ZN5boost9unit_testL16INV_TEST_UNIT_IDE)
  br i1 %7, label %tailrecurse, label %tailrecurse._crit_edge

tailrecurse:                                      ; preds = %2, %tailrecurse
  %8 = phi ptr [ %15, %tailrecurse ], [ %6, %2 ]
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5boost9unit_test14class_propertyImEcvRKmEv(ptr noundef nonnull align 8 dereferenceable(8) %8)
  %10 = load i64, ptr %9, align 8, !tbaa !10
  %11 = tail call noundef nonnull align 8 dereferenceable(384) ptr @_ZN5boost9unit_test9framework3getINS0_10test_suiteEEERT_m(i64 noundef %10)
  %12 = getelementptr inbounds i8, ptr %11, i64 216
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = add i64 %13, %1
  store i64 %14, ptr %12, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %11, i64 64
  %16 = tail call noundef zeroext i1 @_ZN5boost9unit_testneImEEbRKNS0_14class_propertyIT_EERKS3_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) @_ZN5boost9unit_testL16INV_TEST_UNIT_IDE)
  br i1 %16, label %tailrecurse, label %tailrecurse._crit_edge

tailrecurse._crit_edge:                           ; preds = %tailrecurse, %2
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(384) ptr @_ZN5boost9unit_test9framework3getINS0_10test_suiteEEERT_m(i64 noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { 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 #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 = { 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" }

!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, !7, i64 0}
!6 = !{!"_ZTSN5boost9unit_test14class_propertyImEE", !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass