[PATCH] D135640: fix vectorization analysis msg for runtime checks
Josh Milthorpe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 16 15:00:32 PDT 2022
milthorpe updated this revision to Diff 468103.
milthorpe added a comment.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Update vectorization analysis msg in clang frontend test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135640/new/
https://reviews.llvm.org/D135640
Files:
clang/test/Frontend/optimization-remark-options.c
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -10345,8 +10345,8 @@
return OptimizationRemarkAnalysisAliasing(
DEBUG_TYPE, "CantReorderMemOps", L->getStartLoc(),
L->getHeader())
- << "loop not vectorized: cannot prove it is safe to reorder "
- "memory operations";
+ << "loop not vectorized: it is not profitable to reorder memory "
+ "operations with runtime checks";
});
LLVM_DEBUG(dbgs() << "LV: Too many memory checks needed.\n");
Hints.emitRemarkWithHints();
Index: clang/test/Frontend/optimization-remark-options.c
===================================================================
--- clang/test/Frontend/optimization-remark-options.c
+++ clang/test/Frontend/optimization-remark-options.c
@@ -12,7 +12,7 @@
return v;
}
-// CHECK: {{.*}}:18:3: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!
+// CHECK: {{.*}}:18:3: remark: loop not vectorized: it is not profitable to reorder memory operations with runtime checks; allow reordering by specifying '#pragma clang loop vectorize(enable)' before the loop. If the arrays will always be independent specify '#pragma clang loop vectorize(assume_safety)' before the loop or provide the '__restrict__' qualifier with the independent array arguments. Erroneous results will occur if these options are incorrectly applied!
void foo2(int *dw, int *uw, int *A, int *B, int *C, int *D, int N) {
for (long i = 0; i < N; i++) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135640.468103.patch
Type: text/x-patch
Size: 2079 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221016/0099980b/attachment.bin>
More information about the llvm-commits
mailing list