r310582 - [ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1.
Nikolai Bozhenov via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 10 04:22:53 PDT 2017
Author: n.bozhenov
Date: Thu Aug 10 04:22:52 2017
New Revision: 310582
URL: http://llvm.org/viewvc/llvm-project?rev=310582&view=rev
Log:
[ValueTracking] Enabling ValueTracking patch by default (recommit). Part 1.
The original patch was an improvement to IR ValueTracking on non-negative
integers. It has been checked in to trunk (D18777, r284022). But was disabled by
default due to performance regressions.
Perf impact has improved. The patch would be enabled by default.
Reviewers: reames, hfinkel
Differential Revision: https://reviews.llvm.org/D34101
Patch by: Olga Chupina <olga.chupina at intel.com>
Modified:
cfe/trunk/test/Frontend/optimization-remark-options.c
Modified: cfe/trunk/test/Frontend/optimization-remark-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Frontend/optimization-remark-options.c?rev=310582&r1=310581&r2=310582&view=diff
==============================================================================
--- cfe/trunk/test/Frontend/optimization-remark-options.c (original)
+++ cfe/trunk/test/Frontend/optimization-remark-options.c Thu Aug 10 04:22:52 2017
@@ -14,7 +14,7 @@ double foo(int N) {
// CHECK: {{.*}}:17: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!
void foo2(int *dw, int *uw, int *A, int *B, int *C, int *D, int N) {
- for (int i = 0; i < N; i++) {
+ for (long i = 0; i < N; i++) {
dw[i] = A[i] + B[i - 1] + C[i - 2] + D[i - 3];
uw[i] = A[i] + B[i + 1] + C[i + 2] + D[i + 3];
}
More information about the cfe-commits
mailing list