; ModuleID = 'xx.c' source_filename = "xx.c" target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" target triple = "s390x-ibm-linux" %struct.btDbvtNode = type { %struct.btDbvtVolume, ptr, [2 x ptr] } %struct.btDbvtVolume = type { [8 x float] } ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) define dso_local void @optimizeIncremental(ptr noundef %node) local_unnamed_addr #0 !dbg !9 { entry: %tmp.sroa.0.i = alloca [8 x float], align 4, !DIAssignID !30 tail call void @llvm.dbg.value(metadata ptr %node, metadata !29, metadata !DIExpression()), !dbg !31 %arrayidx2 = getelementptr inbounds %struct.btDbvtNode, ptr %node, i64 0, i32 2, i64 1, !dbg !32 %0 = load ptr, ptr %arrayidx2, align 8, !dbg !32, !tbaa !33 %cmp.not3 = icmp eq ptr %0, null, !dbg !37 br i1 %cmp.not3, label %while.end, label %while.body, !dbg !38 while.body: ; preds = %entry, %while.body %arrayidx5 = phi ptr [ %arrayidx, %while.body ], [ %arrayidx2, %entry ] %node.addr.04 = phi ptr [ %1, %while.body ], [ %node, %entry ] tail call void @llvm.dbg.value(metadata ptr %node.addr.04, metadata !29, metadata !DIExpression()), !dbg !31 call void @llvm.dbg.assign(metadata i1 undef, metadata !39, metadata !DIExpression(), metadata !30, metadata ptr %tmp.sroa.0.i, metadata !DIExpression()), !dbg !47 call void @llvm.dbg.value(metadata ptr %node.addr.04, metadata !44, metadata !DIExpression()), !dbg !47 %parent.i = getelementptr inbounds %struct.btDbvtNode, ptr %node.addr.04, i64 0, i32 1, !dbg !49 %1 = load ptr, ptr %parent.i, align 8, !dbg !49, !tbaa !50 call void @llvm.dbg.value(metadata ptr %1, metadata !45, metadata !DIExpression()), !dbg !47 %parent1.i = getelementptr inbounds %struct.btDbvtNode, ptr %1, i64 0, i32 1, !dbg !53 %2 = load ptr, ptr %parent1.i, align 8, !dbg !53, !tbaa !50 call void @llvm.dbg.value(metadata ptr %2, metadata !46, metadata !DIExpression()), !dbg !47 store ptr %node.addr.04, ptr %parent1.i, align 8, !dbg !54, !tbaa !50 store ptr %2, ptr %parent.i, align 8, !dbg !55, !tbaa !50 %childs.i = getelementptr inbounds %struct.btDbvtNode, ptr %node.addr.04, i64 0, i32 2, !dbg !56 %3 = load ptr, ptr %childs.i, align 8, !dbg !57, !tbaa !33 %parent4.i = getelementptr inbounds %struct.btDbvtNode, ptr %3, i64 0, i32 1, !dbg !58 store ptr %1, ptr %parent4.i, align 8, !dbg !59, !tbaa !50 %4 = load ptr, ptr %arrayidx5, align 8, !dbg !60, !tbaa !33 %parent7.i = getelementptr inbounds %struct.btDbvtNode, ptr %4, i64 0, i32 1, !dbg !61 store ptr %1, ptr %parent7.i, align 8, !dbg !62, !tbaa !50 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %tmp.sroa.0.i), !dbg !63 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %tmp.sroa.0.i, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 32, i1 false), !dbg !64, !tbaa.struct !65, !DIAssignID !67 call void @llvm.dbg.assign(metadata i1 undef, metadata !39, metadata !DIExpression(), metadata !67, metadata ptr %tmp.sroa.0.i, metadata !DIExpression()), !dbg !47 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %node.addr.04, i64 32, i1 false), !dbg !68, !tbaa.struct !65 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %node.addr.04, ptr noundef nonnull align 4 dereferenceable(32) %tmp.sroa.0.i, i64 32, i1 false), !dbg !69, !tbaa.struct !65 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %tmp.sroa.0.i), !dbg !70 tail call void @llvm.dbg.value(metadata ptr %1, metadata !29, metadata !DIExpression()), !dbg !31 %arrayidx = getelementptr inbounds %struct.btDbvtNode, ptr %1, i64 0, i32 2, i64 1, !dbg !32 %5 = load ptr, ptr %arrayidx, align 8, !dbg !32, !tbaa !33 %cmp.not = icmp eq ptr %5, null, !dbg !37 br i1 %cmp.not, label %while.end, label %while.body, !dbg !38, !llvm.loop !71 while.end: ; preds = %while.body, %entry ret void, !dbg !75 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; 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) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare void @llvm.dbg.assign(metadata, metadata, metadata, metadata, metadata, metadata) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare void @llvm.dbg.value(metadata, metadata, metadata) #4 attributes #0 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="z10" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!2, !3, !4, !5, !6, !7} !llvm.ident = !{!8} !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 18.0.0git (git@github.com:llvm/llvm-project.git 8959cef135d06e83a5fc02e09b532df21f4285d9)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) !1 = !DIFile(filename: "xx.c", directory: "/home/uweigand/llvm/build/llvm-head/test-suite-build", checksumkind: CSK_MD5, checksum: "cbfc899447d86489bab837d9dff511aa") !2 = !{i32 7, !"Dwarf Version", i32 5} !3 = !{i32 2, !"Debug Info Version", i32 3} !4 = !{i32 1, !"wchar_size", i32 4} !5 = !{i32 8, !"PIC Level", i32 2} !6 = !{i32 7, !"PIE Level", i32 2} !7 = !{i32 7, !"debug-info-assignment-tracking", i1 true} !8 = !{!"clang version 18.0.0git (git@github.com:llvm/llvm-project.git 8959cef135d06e83a5fc02e09b532df21f4285d9)"} !9 = distinct !DISubprogram(name: "optimizeIncremental", scope: !1, file: !1, line: 28, type: !10, scopeLine: 29, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !28) !10 = !DISubroutineType(types: !11) !11 = !{null, !12} !12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !13, size: 64) !13 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "btDbvtNode", file: !1, line: 7, size: 448, elements: !14) !14 = !{!15, !23, !24} !15 = !DIDerivedType(tag: DW_TAG_member, name: "volume", scope: !13, file: !1, line: 9, baseType: !16, size: 256) !16 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "btDbvtVolume", file: !1, line: 2, size: 256, elements: !17) !17 = !{!18} !18 = !DIDerivedType(tag: DW_TAG_member, name: "mi", scope: !16, file: !1, line: 4, baseType: !19, size: 256) !19 = !DICompositeType(tag: DW_TAG_array_type, baseType: !20, size: 256, elements: !21) !20 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float) !21 = !{!22} !22 = !DISubrange(count: 8) !23 = !DIDerivedType(tag: DW_TAG_member, name: "parent", scope: !13, file: !1, line: 10, baseType: !12, size: 64, offset: 256) !24 = !DIDerivedType(tag: DW_TAG_member, name: "childs", scope: !13, file: !1, line: 11, baseType: !25, size: 128, offset: 320) !25 = !DICompositeType(tag: DW_TAG_array_type, baseType: !12, size: 128, elements: !26) !26 = !{!27} !27 = !DISubrange(count: 2) !28 = !{!29} !29 = !DILocalVariable(name: "node", arg: 1, scope: !9, file: !1, line: 28, type: !12) !30 = distinct !DIAssignID() !31 = !DILocation(line: 0, scope: !9) !32 = !DILocation(line: 30, column: 8, scope: !9) !33 = !{!34, !34, i64 0} !34 = !{!"any pointer", !35, i64 0} !35 = !{!"omnipotent char", !36, i64 0} !36 = !{!"Simple C/C++ TBAA"} !37 = !DILocation(line: 30, column: 24, scope: !9) !38 = !DILocation(line: 30, column: 2, scope: !9) !39 = !DILocalVariable(name: "tmp", scope: !40, file: !1, line: 22, type: !16) !40 = distinct !DISubprogram(name: "sort", scope: !1, file: !1, line: 14, type: !41, scopeLine: 15, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !43) !41 = !DISubroutineType(types: !42) !42 = !{!12, !12} !43 = !{!44, !45, !46, !39} !44 = !DILocalVariable(name: "node", arg: 1, scope: !40, file: !1, line: 14, type: !12) !45 = !DILocalVariable(name: "p", scope: !40, file: !1, line: 16, type: !12) !46 = !DILocalVariable(name: "q", scope: !40, file: !1, line: 17, type: !12) !47 = !DILocation(line: 0, scope: !40, inlinedAt: !48) !48 = distinct !DILocation(line: 31, column: 8, scope: !9) !49 = !DILocation(line: 16, column: 29, scope: !40, inlinedAt: !48) !50 = !{!51, !34, i64 32} !51 = !{!"btDbvtNode", !52, i64 0, !34, i64 32, !35, i64 40} !52 = !{!"btDbvtVolume", !35, i64 0} !53 = !DILocation(line: 17, column: 26, scope: !40, inlinedAt: !48) !54 = !DILocation(line: 18, column: 11, scope: !40, inlinedAt: !48) !55 = !DILocation(line: 19, column: 14, scope: !40, inlinedAt: !48) !56 = !DILocation(line: 20, column: 8, scope: !40, inlinedAt: !48) !57 = !DILocation(line: 20, column: 2, scope: !40, inlinedAt: !48) !58 = !DILocation(line: 20, column: 19, scope: !40, inlinedAt: !48) !59 = !DILocation(line: 20, column: 25, scope: !40, inlinedAt: !48) !60 = !DILocation(line: 21, column: 2, scope: !40, inlinedAt: !48) !61 = !DILocation(line: 21, column: 19, scope: !40, inlinedAt: !48) !62 = !DILocation(line: 21, column: 25, scope: !40, inlinedAt: !48) !63 = !DILocation(line: 22, column: 2, scope: !40, inlinedAt: !48) !64 = !DILocation(line: 22, column: 31, scope: !40, inlinedAt: !48) !65 = !{i64 0, i64 32, !66} !66 = !{!35, !35, i64 0} !67 = distinct !DIAssignID() !68 = !DILocation(line: 23, column: 20, scope: !40, inlinedAt: !48) !69 = !DILocation(line: 24, column: 17, scope: !40, inlinedAt: !48) !70 = !DILocation(line: 26, column: 1, scope: !40, inlinedAt: !48) !71 = distinct !{!71, !38, !72, !73, !74} !72 = !DILocation(line: 31, column: 17, scope: !9) !73 = !{!"llvm.loop.mustprogress"} !74 = !{!"llvm.loop.unroll.disable"} !75 = !DILocation(line: 32, column: 1, scope: !9)