1; RUN: opt %loadNPMPolly -pass-remarks-missed="polly-detect" -polly-detect-track-failures '-passes=print<polly-detect>' -disable-output < %s 2>&1 | FileCheck %s 2 3; #define N 1024 4; double invalidCall(double A[N]); 5; 6; void a(double A[N], int n) { 7; for (int i=0; i<n; ++i) { 8; A[i] = invalidCall(A); 9; } 10; } 11 12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 13 14define void @a(ptr %A, i32 %n) #0 !dbg !4 { 15entry: 16 %cmp1 = icmp sgt i32 %n, 0, !dbg !10 17 br i1 %cmp1, label %for.body.lr.ph, label %for.end, !dbg !10 18 19for.body.lr.ph: ; preds = %entry 20 %0 = zext i32 %n to i64 21 br label %for.body, !dbg !10 22 23for.body: ; preds = %for.body, %for.body.lr.ph 24 %indvar = phi i64 [ 0, %for.body.lr.ph ], [ %indvar.next, %for.body ] 25 %arrayidx = getelementptr double, ptr %A, i64 %indvar, !dbg !12 26 %call = tail call double @invalidCall(ptr %A) #2, !dbg !12 27 store double %call, ptr %arrayidx, align 8, !dbg !12, !tbaa !14 28 %indvar.next = add i64 %indvar, 1, !dbg !10 29 %exitcond = icmp eq i64 %indvar.next, %0, !dbg !10 30 br i1 %exitcond, label %for.end.loopexit, label %for.body, !dbg !10 31 32for.end.loopexit: ; preds = %for.body 33 br label %for.end 34 35for.end: ; preds = %for.end.loopexit, %entry 36 ret void, !dbg !18 37} 38 39declare double @invalidCall(ptr) #1 40 41; CHECK: remark: ReportFuncCall.c:4:8: The following errors keep this region from being a Scop. 42; CHECK: remark: ReportFuncCall.c:5:12: This function call cannot be handled. Try to inline it. 43 44!llvm.dbg.cu = !{!0} 45!llvm.module.flags = !{!7, !8} 46!llvm.ident = !{!9} 47 48!0 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang version 3.5.0 ", isOptimized: true, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, globals: !2, imports: !2) 49!1 = !DIFile(filename: "ReportFuncCall.c", directory: "/home/simbuerg/Projekte/llvm/tools/polly/test/ScopDetectionDiagnostics") 50!2 = !{} 51!4 = distinct !DISubprogram(name: "a", line: 3, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 3, file: !1, scope: !5, type: !6, retainedNodes: !2) 52!5 = !DIFile(filename: "ReportFuncCall.c", directory: "/home/simbuerg/Projekte/llvm/tools/polly/test/ScopDetectionDiagnostics") 53!6 = !DISubroutineType(types: !2) 54!7 = !{i32 2, !"Dwarf Version", i32 4} 55!8 = !{i32 2, !"Debug Info Version", i32 3} 56!9 = !{!"clang version 3.5.0 "} 57!10 = !DILocation(line: 4, column: 8, scope: !11) 58!11 = distinct !DILexicalBlock(line: 4, column: 3, file: !1, scope: !4) 59!12 = !DILocation(line: 5, column: 12, scope: !13) 60!13 = distinct !DILexicalBlock(line: 4, column: 27, file: !1, scope: !11) 61!14 = !{!15, !15, i64 0} 62!15 = !{!"double", !16, i64 0} 63!16 = !{!"omnipotent char", !17, i64 0} 64!17 = !{!"Simple C/C++ TBAA"} 65!18 = !DILocation(line: 7, column: 1, scope: !4) 66