1; RUN: opt < %s -O2 -S | FileCheck %s 2 3target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" 4target triple = "armv4t-none-unknown-eabi" 5 6@foo.coefficient1 = internal unnamed_addr global i32* null, align 4, !dbg !0 7@iirLow1 = external dso_local local_unnamed_addr global i32*, align 4 8 9; Function Attrs: nounwind 10define dso_local void @foo(i32 %i2) local_unnamed_addr #0 !dbg !2 { 11entry: 12 call void @llvm.dbg.value(metadata i32 %i2, metadata !11, metadata !DIExpression()), !dbg !18 13 %0 = load i32*, i32** @iirLow1, align 4, !dbg !19 14 store i32 0, i32* %0, align 4, !dbg !24 15 %1 = ptrtoint i32* %0 to i32, !dbg !27 16 store i32 %1, i32* bitcast (i32** @foo.coefficient1 to i32*), align 4, !dbg !28 17 ret void, !dbg !29 18} 19 20; Function Attrs: nounwind readnone speculatable 21declare void @llvm.dbg.value(metadata, metadata, metadata) #1 22 23attributes #0 = { nounwind } 24attributes #1 = { nounwind readnone speculatable } 25 26!llvm.dbg.cu = !{!7} 27!llvm.module.flags = !{!13, !14, !15, !16} 28!llvm.ident = !{!17} 29 30!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression()) 31!1 = distinct !DIGlobalVariable(name: "coefficient1", scope: !2, file: !3, line: 5, type: !12, isLocal: true, isDefinition: true) 32!2 = distinct !DISubprogram(name: "foo", scope: !3, file: !3, line: 3, type: !4, isLocal: false, isDefinition: true, scopeLine: 4, flags: DIFlagPrototyped, isOptimized: true, unit: !7, retainedNodes: !10) 33!3 = !DIFile(filename: "norecurse_debug.c", directory: "/") 34!4 = !DISubroutineType(types: !5) 35!5 = !{null, !6} 36!6 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 37!7 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !8, globals: !9, nameTableKind: None) 38!8 = !{} 39!9 = !{!0} 40!10 = !{!11} 41!11 = !DILocalVariable(name: "i2", arg: 1, scope: !2, file: !3, line: 3, type: !6) 42!12 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32) 43!13 = !{i32 2, !"Dwarf Version", i32 4} 44!14 = !{i32 2, !"Debug Info Version", i32 3} 45!15 = !{i32 1, !"wchar_size", i32 4} 46!16 = !{i32 1, !"min_enum_size", i32 4} 47!17 = !{!""} 48!18 = !DILocation(line: 3, column: 14, scope: !2) 49!19 = !DILocation(line: 7, column: 6, scope: !2) 50!24 = !DILocation(line: 7, column: 14, scope: !2) 51!27 = !DILocation(line: 9, column: 20, scope: !2) 52!28 = !DILocation(line: 9, column: 18, scope: !2) 53!29 = !DILocation(line: 10, column: 1, scope: !2) 54 55; CHECK: attributes #0 = { nofree norecurse nounwind } 56; CHECK-NOT: foo.coefficient1 57