Skip to content

Commit 2241343

Browse files
author
GYT
committed
Try combining Test1 and Test2 into one file
1 parent 117c358 commit 2241343

File tree

2 files changed

+37
-58
lines changed

2 files changed

+37
-58
lines changed

llvm/test/Transforms/LoopVectorize/diag-disabled-vectorization-msgs.ll

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
1+
; TEST 1
12
; This test checks that we emit only the correct debug messages and
23
; optimization remark when the loop vectorizer is disabled by loop metadata.
34

45
; REQUIRES: asserts
56
; RUN: opt -passes=loop-vectorize -pass-remarks=loop-vectorize \
67
; RUN: -pass-remarks-missed=loop-vectorize \
78
; RUN: -pass-remarks-analysis=loop-vectorize -debug -disable-output \
8-
; RUN: < %s 2>&1 | FileCheck %s
9-
; CHECK-NOT: LV: We can vectorize this loop
10-
; CHECK-NOT: LV: Not vectorizing: loop hasDisableAllTransformsHint
11-
; CHECK-NOT: LV: [BUG] Not vectorizing: loop vect disabled for an unknown reason
12-
; CHECK-NOT: LV: Not vectorizing: VectorizeOnlyWhenForced is set
13-
; CHECK-NOT: LV: Not vectorizing: Disabled/already vectorized
14-
; CHECK-NOT: LV: Not vectorizing: Cannot prove legality
15-
; CHECK: LV: Loop hints: force=disabled
16-
; CHECK: LV: Not vectorizing: #pragma vectorize disable.
17-
; CHECK: remark:
18-
; CHECK-SAME: loop not vectorized: vectorization is explicitly disabled
19-
; CHECK: LV: Loop hints prevent vectorization
9+
; RUN: < %s 2>&1 | FileCheck --check-prefix=METADATA %s
10+
; METADATA-NOT: LV: We can vectorize this loop
11+
; METADATA-NOT: LV: Not vectorizing: loop hasDisableAllTransformsHint
12+
; METADATA-NOT: LV: [BUG] Not vectorizing: loop vect disabled for an unknown reason
13+
; METADATA-NOT: LV: Not vectorizing: VectorizeOnlyWhenForced is set
14+
; METADATA-NOT: LV: Not vectorizing: Disabled/already vectorized
15+
; METADATA-NOT: LV: Not vectorizing: Cannot prove legality
16+
; METADATA: LV: Loop hints: force=disabled
17+
; METADATA: LV: Not vectorizing: #pragma vectorize disable.
18+
; METADATA: remark:
19+
; METADATA-SAME: loop not vectorized: vectorization is explicitly disabled
20+
; METADATA: LV: Loop hints prevent vectorization
21+
22+
; TEST 2
23+
; This test checks that we emit only the correct debug messages and
24+
; optimization remark when the loop is not vectorized due to the
25+
; vectorize-forced-only pass option being set.
26+
27+
; Strip metadata for FORCEDONLY run, keep it for METADATA run
28+
; RUN: sed 's/,[[:space:]]*!llvm\.loop[[:space:]]*!0//' %s | \
29+
; RUN: opt -passes='loop-vectorize<vectorize-forced-only>' \
30+
; RUN: -pass-remarks=loop-vectorize \
31+
; RUN: -pass-remarks-missed=loop-vectorize \
32+
; RUN: -pass-remarks-analysis=loop-vectorize -debug -disable-output \
33+
; RUN: 2>&1 | FileCheck --check-prefix=FORCEDONLY %s
34+
; FORCEDONLY-NOT: LV: We can vectorize this loop
35+
; FORCEDONLY-NOT: LV: Not vectorizing: loop hasDisableAllTransformsHint
36+
; FORCEDONLY-NOT: LV: [BUG] Not vectorizing: loop vect disabled for an unknown reason
37+
; FORCEDONLY-NOT: LV: Not vectorizing: #pragma vectorize disable
38+
; FORCEDONLY-NOT: LV: Not vectorizing: Disabled/already vectorized
39+
; FORCEDONLY-NOT: LV: Not vectorizing: Cannot prove legality
40+
; FORCEDONLY: LV: Loop hints: force=?
41+
; FORCEDONLY: LV: Not vectorizing: VectorizeOnlyWhenForced is set, and no #pragma vectorize enable
42+
; FORCEDONLY: remark:
43+
; FORCEDONLY-SAME: loop not vectorized: only vectorizing loops that explicitly request it
44+
; FORCEDONLY: LV: Loop hints prevent vectorization
2045

2146
define double @CompareDistmats(ptr %distmat1, ptr %distmat2){
2247
entry:

llvm/test/Transforms/LoopVectorize/diag-vectorize-forced-only-msgs.ll

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)