Index: llvm/test/Transforms/LoopVectorize/pr39018.ll =================================================================== --- llvm/test/Transforms/LoopVectorize/pr39018.ll +++ llvm/test/Transforms/LoopVectorize/pr39018.ll @@ -12,7 +12,6 @@ ;; int sum = 5; ;; for (int i = 0; i < BUFSZ; i++) ;; sum += foo[i]; - ;; return sum; ;; } @@ -25,11 +24,9 @@ target triple = "x86_64-pc-linux-gnu" -; Function Attrs: norecurse nounwind readnone uwtable -define dso_local i32 @main() local_unnamed_addr #0 !dbg !7 { +define dso_local i32 @main() local_unnamed_addr !dbg !7 { %1 = alloca [192 x i32], align 16 %2 = bitcast [192 x i32]* %1 to i8*, !dbg !20 - call void @llvm.lifetime.start.p0i8(i64 768, i8* nonnull %2) #3, !dbg !20 call void @llvm.dbg.declare(metadata [192 x i32]* %1, metadata !13, metadata !DIExpression()), !dbg !21 call void @llvm.dbg.value(metadata i32 5, metadata !17, metadata !DIExpression()), !dbg !22 call void @llvm.dbg.value(metadata i32 0, metadata !18, metadata !DIExpression()), !dbg !23 @@ -37,40 +34,34 @@ 3: ; preds = %4 call void @llvm.dbg.value(metadata i32 %9, metadata !17, metadata !DIExpression()), !dbg !22 - call void @llvm.lifetime.end.p0i8(i64 768, i8* nonnull %2) #3, !dbg !25 - ret i32 %9, !dbg !26 + ret i32 %9, !dbg !25 4: ; preds = %4, %0 %5 = phi i64 [ 0, %0 ], [ %10, %4 ] %6 = phi i32 [ 5, %0 ], [ %9, %4 ] call void @llvm.dbg.value(metadata i64 %5, metadata !18, metadata !DIExpression()), !dbg !23 call void @llvm.dbg.value(metadata i32 %6, metadata !17, metadata !DIExpression()), !dbg !22 - %7 = getelementptr inbounds [192 x i32], [192 x i32]* %1, i64 0, i64 %5, !dbg !27 - %8 = load i32, i32* %7, align 4, !dbg !27, !tbaa !29 - %9 = add nsw i32 %8, %6, !dbg !33 + %7 = getelementptr inbounds [192 x i32], [192 x i32]* %1, i64 0, i64 %5, !dbg !26 + %8 = load i32, i32* %7, align 4, !dbg !26 + %9 = add nsw i32 %8, %6, !dbg !28 call void @llvm.dbg.value(metadata i32 %9, metadata !17, metadata !DIExpression()), !dbg !22 - %10 = add nuw nsw i64 %5, 1, !dbg !34 + %10 = add nuw nsw i64 %5, 1, !dbg !29 call void @llvm.dbg.value(metadata i64 %10, metadata !18, metadata !DIExpression()), !dbg !23 - %11 = icmp eq i64 %10, 192, !dbg !35 - br i1 %11, label %3, label %4, !dbg !24, !llvm.loop !36 + %11 = icmp eq i64 %10, 192, !dbg !30 + br i1 %11, label %3, label %4, !dbg !24, !llvm.loop !31 } -; Function Attrs: argmemonly nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1 - -; Function Attrs: nounwind readnone speculatable willreturn -declare void @llvm.dbg.declare(metadata, metadata, metadata) #2 +; Function Attrs: argmemonly nofree nosync nounwind willreturn +declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) -; Function Attrs: argmemonly nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1 +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.declare(metadata, metadata, metadata) -; Function Attrs: nounwind readnone speculatable willreturn -declare void @llvm.dbg.value(metadata, metadata, metadata) #2 +; Function Attrs: argmemonly nofree nosync nounwind willreturn +declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) -attributes #0 = { norecurse nounwind readnone uwtable} -attributes #1 = { argmemonly nounwind willreturn } -attributes #2 = { nounwind readnone speculatable willreturn } -attributes #3 = { nounwind } +; Function Attrs: nofree nosync nounwind readnone speculatable willreturn +declare void @llvm.dbg.value(metadata, metadata, metadata) !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!3, !4, !5} @@ -101,17 +92,12 @@ !22 = !DILocation(line: 0, scope: !7) !23 = !DILocation(line: 0, scope: !19) !24 = !DILocation(line: 9, column: 3, scope: !19) -!25 = !DILocation(line: 13, column: 1, scope: !7) -!26 = !DILocation(line: 12, column: 3, scope: !7) -!27 = !DILocation(line: 10, column: 12, scope: !28) -!28 = distinct !DILexicalBlock(scope: !19, file: !8, line: 9, column: 3) -!29 = !{!30, !30, i64 0} -!30 = !{!"int", !31, i64 0} -!31 = !{!"omnipotent char", !32, i64 0} -!32 = !{!"Simple C++ TBAA"} -!33 = !DILocation(line: 10, column: 9, scope: !28) -!34 = !DILocation(line: 9, column: 31, scope: !28) -!35 = !DILocation(line: 9, column: 21, scope: !28) -!36 = distinct !{!36, !24, !37, !38} -!37 = !DILocation(line: 10, column: 17, scope: !19) -!38 = !{!"llvm.loop.unroll.disable"} +!25 = !DILocation(line: 12, column: 3, scope: !7) +!26 = !DILocation(line: 10, column: 12, scope: !27) +!27 = distinct !DILexicalBlock(scope: !19, file: !8, line: 9, column: 3) +!28 = !DILocation(line: 10, column: 9, scope: !27) +!29 = !DILocation(line: 9, column: 31, scope: !27) +!30 = !DILocation(line: 9, column: 21, scope: !27) +!31 = distinct !{!31, !24, !32, !33} +!32 = !DILocation(line: 10, column: 17, scope: !19) +!33 = !{!"llvm.loop.unroll.disable"}