Differential D134745 Diff 463299 llvm/test/Transforms/LoopVectorize/no_switch_disable_vectorization.ll
Changeset View
Changeset View
Standalone View
Standalone View
llvm/test/Transforms/LoopVectorize/no_switch_disable_vectorization.ll
; RUN: opt < %s -loop-vectorize -force-vector-width=4 -transform-warning -S 2>&1 | FileCheck %s | ; RUN: opt < %s -loop-vectorize -force-vector-width=4 -transform-warning -S 2>&1 | FileCheck %s | ||||
; RUN: opt < %s -loop-vectorize -force-vector-width=1 -transform-warning -S 2>&1 | FileCheck %s -check-prefix=NOANALYSIS | ; RUN: opt < %s -loop-vectorize -force-vector-width=1 -transform-warning -S 2>&1 | FileCheck %s -check-prefix=NOANALYSIS | ||||
; RUN: opt < %s -loop-vectorize -force-vector-width=4 -transform-warning -pass-remarks-missed='loop-vectorize' -S 2>&1 | FileCheck %s -check-prefix=MOREINFO | ; RUN: opt < %s -loop-vectorize -force-vector-width=4 -transform-warning -pass-remarks-missed='loop-vectorize' -S 2>&1 | FileCheck %s -check-prefix=MOREINFO | ||||
; This test is a copy of no_switch.ll, with the "llvm.loop.vectorize.enable" metadata set to false. | ; This test is a copy of no_switch.ll, with the "llvm.loop.vectorize.enable" metadata set to false. | ||||
; It tests that vectorization is explicitly disabled and no warnings are emitted. | ; It tests that vectorization and interleave is explicitly disabled and no warnings are emitted. | ||||
; CHECK-NOT: remark: source.cpp:4:5: loop not vectorized: loop contains a switch statement | ; CHECK-NOT: remark: source.cpp:4:5: loop not vectorized: loop contains a switch statement | ||||
; CHECK-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ; CHECK-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ||||
; NOANALYSIS-NOT: remark: {{.*}} | ; NOANALYSIS-NOT: remark: {{.*}} | ||||
; NOANALYSIS-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ; NOANALYSIS-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ||||
; MOREINFO: remark: source.cpp:4:5: loop not vectorized: vectorization is explicitly disabled | ; MOREINFO: remark: source.cpp:4:5: loop not vectorized: vectorization and interleave is explicitly disabled | ||||
; MOREINFO-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ; MOREINFO-NOT: warning: source.cpp:4:5: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering | ||||
; CHECK: _Z11test_switchPii | ; CHECK: _Z11test_switchPii | ||||
; CHECK-NOT: x i32> | ; CHECK-NOT: x i32> | ||||
; CHECK: ret | ; CHECK: ret | ||||
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
!4 = distinct !DISubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2) | !4 = distinct !DISubprogram(name: "test_switch", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 1, file: !1, scope: !5, type: !6, retainedNodes: !2) | ||||
!5 = !DIFile(filename: "source.cpp", directory: ".") | !5 = !DIFile(filename: "source.cpp", directory: ".") | ||||
!6 = !DISubroutineType(types: !2) | !6 = !DISubroutineType(types: !2) | ||||
!7 = !{i32 2, !"Dwarf Version", i32 2} | !7 = !{i32 2, !"Dwarf Version", i32 2} | ||||
!8 = !{i32 2, !"Debug Info Version", i32 3} | !8 = !{i32 2, !"Debug Info Version", i32 3} | ||||
!9 = !{!"clang version 3.5.0"} | !9 = !{!"clang version 3.5.0"} | ||||
!10 = !DILocation(line: 3, column: 8, scope: !11) | !10 = !DILocation(line: 3, column: 8, scope: !11) | ||||
!11 = distinct !DILexicalBlock(line: 3, column: 3, file: !1, scope: !4) | !11 = distinct !DILexicalBlock(line: 3, column: 3, file: !1, scope: !4) | ||||
!12 = !{!12, !13, !13} | !12 = !{!12, !13, !25} | ||||
!13 = !{!"llvm.loop.vectorize.enable", i1 false} | !13 = !{!"llvm.loop.vectorize.enable", i1 false} | ||||
!14 = !DILocation(line: 4, column: 5, scope: !15) | !14 = !DILocation(line: 4, column: 5, scope: !15) | ||||
!15 = distinct !DILexicalBlock(line: 3, column: 36, file: !1, scope: !11) | !15 = distinct !DILexicalBlock(line: 3, column: 36, file: !1, scope: !11) | ||||
!16 = !{!17, !17, i64 0} | !16 = !{!17, !17, i64 0} | ||||
!17 = !{!"int", !18, i64 0} | !17 = !{!"int", !18, i64 0} | ||||
!18 = !{!"omnipotent char", !19, i64 0} | !18 = !{!"omnipotent char", !19, i64 0} | ||||
!19 = !{!"Simple C/C++ TBAA"} | !19 = !{!"Simple C/C++ TBAA"} | ||||
!20 = !DILocation(line: 6, column: 7, scope: !21) | !20 = !DILocation(line: 6, column: 7, scope: !21) | ||||
!21 = distinct !DILexicalBlock(line: 4, column: 18, file: !1, scope: !15) | !21 = distinct !DILexicalBlock(line: 4, column: 18, file: !1, scope: !15) | ||||
!22 = !DILocation(line: 7, column: 5, scope: !21) | !22 = !DILocation(line: 7, column: 5, scope: !21) | ||||
!23 = !DILocation(line: 9, column: 7, scope: !21) | !23 = !DILocation(line: 9, column: 7, scope: !21) | ||||
!24 = !DILocation(line: 14, column: 1, scope: !4) | !24 = !DILocation(line: 14, column: 1, scope: !4) | ||||
!25 = !{!"llvm.loop.interleave.enable", i1 false} |