-
-
Save nikic/55e38138d0ff09f0ba2c08bc23ea3e86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source_filename = "test.cpp" | |
target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8" | |
target triple = "amdgcn-amd-amdhsa" | |
@__fini_array_end = external hidden addrspace(1) global [0 x ptr], align 8 | |
@__fini_array_start = external hidden addrspace(1) global [0 x ptr], align 8 | |
@__oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 400 | |
; Function Attrs: mustprogress | |
define hidden void @_Z25call_fini_array_callbacksv() local_unnamed_addr #0 { | |
entry: | |
%sub.ptr.div = ashr exact i64 sub (i64 ptrtoint (ptr addrspacecast (ptr addrspace(1) @__fini_array_end to ptr) to i64), i64 ptrtoint (ptr addrspacecast (ptr addrspace(1) @__fini_array_start to ptr) to i64)), 3 | |
%cmp.not2 = icmp slt i64 %sub.ptr.div, 1 | |
br i1 %cmp.not2, label %while.end, label %while.body.preheader | |
while.body.preheader: ; preds = %entry | |
%sub = add nsw i64 %sub.ptr.div, -1 | |
%arrayidx = getelementptr inbounds [0 x ptr], ptr addrspace(1) @__fini_array_start, i64 0, i64 %sub | |
br label %while.body | |
while.body: ; preds = %while.body.preheader, %while.body | |
%start.03 = phi ptr addrspace(1) [ %incdec.ptr, %while.body ], [ %arrayidx, %while.body.preheader ] | |
%incdec.ptr = getelementptr inbounds ptr, ptr addrspace(1) %start.03, i64 -1 | |
%0 = load ptr, ptr addrspace(1) %start.03, align 8, !tbaa !4 | |
tail call void %0() | |
%cmp.not = icmp ult ptr addrspace(1) %incdec.ptr, @__fini_array_start | |
br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !8 | |
while.end: ; preds = %while.body, %entry | |
ret void | |
} | |
attributes #0 = { mustprogress "no-trapping-math"="true" "stack-protector-buffer-size"="8" } | |
!llvm.module.flags = !{!0, !1, !2} | |
!llvm.ident = !{!3} | |
!0 = !{i32 1, !"amdgpu_code_object_version", i32 400} | |
!1 = !{i32 1, !"wchar_size", i32 4} | |
!2 = !{i32 8, !"PIC Level", i32 2} | |
!3 = !{!"clang version 18.0.0"} | |
!4 = !{!5, !5, i64 0} | |
!5 = !{!"any pointer", !6, i64 0} | |
!6 = !{!"omnipotent char", !7, i64 0} | |
!7 = !{!"Simple C++ TBAA"} | |
!8 = distinct !{!8, !9} | |
!9 = !{!"llvm.loop.mustprogress"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment