; ModuleID = 'variables.c'
source_filename = "variables.c"
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx11.0.0"
@global = global i32 5, align 4, !dbg !0
; Function Attrs: nofree nounwind ssp uwtable
define void @variables(i32 %0, i32* %1) local_unnamed_addr #0 !dbg !17 {
%3 = alloca i32, align 4
%4 = alloca i32, align 4
store volatile i32 %0, i32* %3, align 4, !tbaa !25
call void @llvm.dbg.declare(metadata i32* %3, metadata !21, metadata !DIExpression()), !dbg !29
call void @llvm.dbg.value(metadata i32* %1, metadata !22, metadata !DIExpression()), !dbg !30
%5 = bitcast i32* %4 to i8*, !dbg !31
call void @llvm.lifetime.start.p0i8(i64 4, i8* nonnull %5), !dbg !31
call void @llvm.dbg.declare(metadata i32* %4, metadata !23, metadata !DIExpression()), !dbg !32
store volatile i32 72, i32* %4, align 4, !dbg !32, !tbaa !25
%6 = tail call align 16 dereferenceable_or_null(4) i8* @malloc(i64 4) #5, !dbg !33
%7 = bitcast i8* %6 to i32*, !dbg !34
call void @llvm.dbg.value(metadata i32* %7, metadata !24, metadata !DIExpression()), !dbg !30
%8 = load volatile i32, i32* %4, align 4, !dbg !35, !tbaa !25
%9 = add nsw i32 %8, 5, !dbg !36
store volatile i32 %9, i32* %4, align 4, !dbg !37, !tbaa !25
%10 = load volatile i32, i32* %7, align 16, !dbg !38, !tbaa !25
%11 = add nsw i32 %10, 5, !dbg !39
store volatile i32 %11, i32* %7, align 16, !dbg !40, !tbaa !25
%12 = load volatile i32, i32* @global, align 4, !dbg !41, !tbaa !25
%13 = add nsw i32 %12, 5, !dbg !42
store volatile i32 %13, i32* @global, align 4, !dbg !43, !tbaa !25
%14 = load volatile i32, i32* %3, align 4, !dbg !44, !tbaa !25
%15 = add nsw i32 %14, 5, !dbg !45
store volatile i32 %15, i32* %3, align 4, !dbg !46, !tbaa !25
%16 = load volatile i32, i32* %1, align 4, !dbg !47, !tbaa !25
%17 = add nsw i32 %16, 5, !dbg !48
store volatile i32 %17, i32* %1, align 4, !dbg !49, !tbaa !25
call void @llvm.lifetime.end.p0i8(i64 4, i8* nonnull %5), !dbg !50
ret void, !dbg !50
}
; Function Attrs: mustprogress nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn
declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #2
; Function Attrs: inaccessiblememonly mustprogress nofree nounwind willreturn allocsize(0)
declare noalias noundef align 16 i8* @malloc(i64 noundef) local_unnamed_addr #3
; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn
declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #2
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
declare void @llvm.dbg.value(metadata, metadata, metadata) #4
attributes #0 = { nofree nounwind ssp uwtable "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nofree nosync nounwind readnone speculatable willreturn }
attributes #2 = { argmemonly mustprogress nofree nosync nounwind willreturn }
attributes #3 = { inaccessiblememonly mustprogress nofree nounwind willreturn allocsize(0) "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+cx8,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nosync nounwind readnone speculatable willreturn }
attributes #5 = { allocsize(0) }
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!10, !11, !12, !13, !14, !15}
!llvm.ident = !{!16}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = distinct !DIGlobalVariable(name: "global", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "Homebrew clang version 13.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, retainedTypes: !5, globals: !9, splitDebugInlining: false, nameTableKind: None, sysroot: "/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk", sdk: "MacOSX11.sdk")
!3 = !DIFile(filename: "variables.c", directory: "/Users/craig/llvm-ir/tests/basic_bc")
!4 = !{}
!5 = !{!6}
!6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 64)
!7 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !8)
!8 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
!9 = !{!0}
!10 = !{i32 7, !"Dwarf Version", i32 4}
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{i32 1, !"wchar_size", i32 4}
!13 = !{i32 7, !"PIC Level", i32 2}
!14 = !{i32 7, !"uwtable", i32 1}
!15 = !{i32 7, !"frame-pointer", i32 2}
!16 = !{!"Homebrew clang version 13.0.0"}
!17 = distinct !DISubprogram(name: "variables", scope: !3, file: !3, line: 7, type: !18, scopeLine: 7, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !20)
!18 = !DISubroutineType(types: !19)
!19 = !{null, !7, !6}
!20 = !{!21, !22, !23, !24}
!21 = !DILocalVariable(name: "byvalue", arg: 1, scope: !17, file: !3, line: 7, type: !7)
!22 = !DILocalVariable(name: "ptr", arg: 2, scope: !17, file: !3, line: 7, type: !6)
!23 = !DILocalVariable(name: "stack_alloc", scope: !17, file: !3, line: 8, type: !7)
!24 = !DILocalVariable(name: "heap_alloc", scope: !17, file: !3, line: 9, type: !6)
!25 = !{!26, !26, i64 0}
!26 = !{!"int", !27, i64 0}
!27 = !{!"omnipotent char", !28, i64 0}
!28 = !{!"Simple C/C++ TBAA"}
!29 = !DILocation(line: 7, column: 29, scope: !17)
!30 = !DILocation(line: 0, scope: !17)
!31 = !DILocation(line: 8, column: 3, scope: !17)
!32 = !DILocation(line: 8, column: 16, scope: !17)
!33 = !DILocation(line: 9, column: 46, scope: !17)
!34 = !DILocation(line: 9, column: 30, scope: !17)
!35 = !DILocation(line: 12, column: 17, scope: !17)
!36 = !DILocation(line: 12, column: 29, scope: !17)
!37 = !DILocation(line: 12, column: 15, scope: !17)
!38 = !DILocation(line: 15, column: 17, scope: !17)
!39 = !DILocation(line: 15, column: 29, scope: !17)
!40 = !DILocation(line: 15, column: 15, scope: !17)
!41 = !DILocation(line: 18, column: 12, scope: !17)
!42 = !DILocation(line: 18, column: 19, scope: !17)
!43 = !DILocation(line: 18, column: 10, scope: !17)
!44 = !DILocation(line: 21, column: 13, scope: !17)
!45 = !DILocation(line: 21, column: 21, scope: !17)
!46 = !DILocation(line: 21, column: 11, scope: !17)
!47 = !DILocation(line: 24, column: 10, scope: !17)
!48 = !DILocation(line: 24, column: 15, scope: !17)
!49 = !DILocation(line: 24, column: 8, scope: !17)
!50 = !DILocation(line: 25, column: 1, scope: !17)