1; RUN: opt -passes=openmp-opt-cgscc -pass-remarks=openmp-opt -disable-output < %s 2>&1 | FileCheck %s 2; ModuleID = 'deduplication_remarks.c' 3source_filename = "deduplication_remarks.c" 4target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 5target triple = "x86_64-pc-linux-gnu" 6 7%struct.ident_t = type { i32, i32, i32, i32, ptr } 8 9@0 = private unnamed_addr global %struct.ident_t { i32 0, i32 34, i32 0, i32 0, ptr @.str0 }, align 8 10@.str0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1 11 12; CHECK: remark: deduplication_remarks.c:7:10: OpenMP runtime call __kmpc_global_thread_num deduplicated 13; CHECK: remark: deduplication_remarks.c:9:10: OpenMP runtime call __kmpc_global_thread_num deduplicated 14define dso_local void @deduplicate() local_unnamed_addr !dbg !14 { 15 %1 = tail call i32 @__kmpc_global_thread_num(ptr nonnull @0), !dbg !21 16 call void @useI32(i32 %1), !dbg !23 17 %2 = tail call i32 @__kmpc_global_thread_num(ptr nonnull @0), !dbg !24 18 call void @useI32(i32 %2), !dbg !25 19 %3 = tail call i32 @__kmpc_global_thread_num(ptr nonnull @0), !dbg !26 20 call void @useI32(i32 %3), !dbg !27 21 ret void, !dbg !28 22} 23 24declare i32 @__kmpc_global_thread_num(ptr) 25 26declare !dbg !4 void @useI32(i32) local_unnamed_addr 27 28declare void @llvm.dbg.value(metadata, metadata, metadata) 29 30!llvm.dbg.cu = !{!0} 31!llvm.module.flags = !{!8, !9, !10, !11, !12, !29} 32!llvm.ident = !{!13} 33 34!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 10.0.0 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !3, splitDebugInlining: false, nameTableKind: None) 35!1 = !DIFile(filename: "deduplication_remarks.c", directory: "/tmp") 36!2 = !{} 37!3 = !{!4} 38!4 = !DISubprogram(name: "useI32", scope: !1, file: !1, line: 1, type: !5, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized, retainedNodes: !2) 39!5 = !DISubroutineType(types: !6) 40!6 = !{null, !7} 41!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) 42!8 = !{i32 7, !"Dwarf Version", i32 4} 43!9 = !{i32 2, !"Debug Info Version", i32 3} 44!10 = !{i32 1, !"wchar_size", i32 4} 45!11 = !{i32 7, !"PIC Level", i32 2} 46!12 = !{i32 7, !"PIE Level", i32 2} 47!13 = !{!"clang version 10.0.0 "} 48!14 = distinct !DISubprogram(name: "deduplicate", scope: !1, file: !1, line: 4, type: !15, scopeLine: 4, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !17) 49!15 = !DISubroutineType(types: !16) 50!16 = !{null} 51!17 = !{!18, !19, !20} 52!18 = !DILocalVariable(name: "x", scope: !14, file: !1, line: 5, type: !7) 53!19 = !DILocalVariable(name: "y", scope: !14, file: !1, line: 7, type: !7) 54!20 = !DILocalVariable(name: "z", scope: !14, file: !1, line: 9, type: !7) 55!21 = !DILocation(line: 5, column: 10, scope: !14) 56!22 = !DILocation(line: 0, scope: !14) 57!23 = !DILocation(line: 6, column: 2, scope: !14) 58!24 = !DILocation(line: 7, column: 10, scope: !14) 59!25 = !DILocation(line: 8, column: 2, scope: !14) 60!26 = !DILocation(line: 9, column: 10, scope: !14) 61!27 = !DILocation(line: 10, column: 2, scope: !14) 62!28 = !DILocation(line: 13, column: 1, scope: !14) 63!29 = !{i32 7, !"openmp", i32 50} 64