mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
e56023a059
Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236120 91177308-0d34-0410-b5e6-96231b3b80d8
87 lines
3.9 KiB
LLVM
87 lines
3.9 KiB
LLVM
; RUN: opt < %s -loop-vectorize -force-vector-width=4 -S -pass-remarks-missed='loop-vectorize' -pass-remarks-analysis='loop-vectorize' 2>&1 | FileCheck %s
|
|
|
|
; CHECK: remark: source.cpp:4:5: loop not vectorized: loop contains a switch statement
|
|
; CHECK: remark: source.cpp:4:5: loop not vectorized: use -Rpass-analysis=loop-vectorize for more info (Force=true, Vector Width=4)
|
|
; CHECK: warning: source.cpp:4:5: loop not vectorized: failed explicitly specified loop vectorization
|
|
|
|
; CHECK: _Z11test_switchPii
|
|
; CHECK-NOT: x i32>
|
|
; CHECK: ret
|
|
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
; Function Attrs: nounwind optsize ssp uwtable
|
|
define void @_Z11test_switchPii(i32* nocapture %A, i32 %Length) #0 {
|
|
entry:
|
|
%cmp18 = icmp sgt i32 %Length, 0, !dbg !10
|
|
br i1 %cmp18, label %for.body.preheader, label %for.end, !dbg !10, !llvm.loop !12
|
|
|
|
for.body.preheader: ; preds = %entry
|
|
br label %for.body, !dbg !14
|
|
|
|
for.body: ; preds = %for.body.preheader, %for.inc
|
|
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %for.body.preheader ]
|
|
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %indvars.iv, !dbg !14
|
|
%0 = load i32, i32* %arrayidx, align 4, !dbg !14, !tbaa !16
|
|
switch i32 %0, label %for.inc [
|
|
i32 0, label %sw.bb
|
|
i32 1, label %sw.bb3
|
|
], !dbg !14
|
|
|
|
sw.bb: ; preds = %for.body
|
|
%1 = trunc i64 %indvars.iv to i32, !dbg !20
|
|
%mul = shl nsw i32 %1, 1, !dbg !20
|
|
br label %for.inc, !dbg !22
|
|
|
|
sw.bb3: ; preds = %for.body
|
|
%2 = trunc i64 %indvars.iv to i32, !dbg !23
|
|
store i32 %2, i32* %arrayidx, align 4, !dbg !23, !tbaa !16
|
|
br label %for.inc, !dbg !23
|
|
|
|
for.inc: ; preds = %sw.bb3, %for.body, %sw.bb
|
|
%storemerge = phi i32 [ %mul, %sw.bb ], [ 0, %for.body ], [ 0, %sw.bb3 ]
|
|
store i32 %storemerge, i32* %arrayidx, align 4, !dbg !20, !tbaa !16
|
|
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !10
|
|
%lftr.wideiv = trunc i64 %indvars.iv.next to i32, !dbg !10
|
|
%exitcond = icmp eq i32 %lftr.wideiv, %Length, !dbg !10
|
|
br i1 %exitcond, label %for.end.loopexit, label %for.body, !dbg !10, !llvm.loop !12
|
|
|
|
for.end.loopexit: ; preds = %for.inc
|
|
br label %for.end
|
|
|
|
for.end: ; preds = %for.end.loopexit, %entry
|
|
ret void, !dbg !24
|
|
}
|
|
|
|
attributes #0 = { nounwind }
|
|
|
|
!llvm.dbg.cu = !{!0}
|
|
!llvm.module.flags = !{!7, !8}
|
|
!llvm.ident = !{!9}
|
|
|
|
!0 = !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.5.0", isOptimized: true, runtimeVersion: 6, emissionKind: 2, file: !1, enums: !2, retainedTypes: !2, subprograms: !3, globals: !2, imports: !2)
|
|
!1 = !DIFile(filename: "source.cpp", directory: ".")
|
|
!2 = !{}
|
|
!3 = !{!4}
|
|
!4 = !DISubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !5, type: !6, function: void (i32*, i32)* @_Z11test_switchPii, variables: !2)
|
|
!5 = !DIFile(filename: "source.cpp", directory: ".")
|
|
!6 = !DISubroutineType(types: !2)
|
|
!7 = !{i32 2, !"Dwarf Version", i32 2}
|
|
!8 = !{i32 2, !"Debug Info Version", i32 3}
|
|
!9 = !{!"clang version 3.5.0"}
|
|
!10 = !DILocation(line: 3, column: 8, scope: !11)
|
|
!11 = distinct !DILexicalBlock(line: 3, column: 3, file: !1, scope: !4)
|
|
!12 = !{!12, !13, !13}
|
|
!13 = !{!"llvm.loop.vectorize.enable", i1 true}
|
|
!14 = !DILocation(line: 4, column: 5, scope: !15)
|
|
!15 = distinct !DILexicalBlock(line: 3, column: 36, file: !1, scope: !11)
|
|
!16 = !{!17, !17, i64 0}
|
|
!17 = !{!"int", !18, i64 0}
|
|
!18 = !{!"omnipotent char", !19, i64 0}
|
|
!19 = !{!"Simple C/C++ TBAA"}
|
|
!20 = !DILocation(line: 6, column: 7, scope: !21)
|
|
!21 = distinct !DILexicalBlock(line: 4, column: 18, file: !1, scope: !15)
|
|
!22 = !DILocation(line: 7, column: 5, scope: !21)
|
|
!23 = !DILocation(line: 9, column: 7, scope: !21)
|
|
!24 = !DILocation(line: 14, column: 1, scope: !4)
|