From 00186ef1f9bf5aebb84d55889e4028fbf43061a4 Mon Sep 17 00:00:00 2001 From: Nikolai Bozhenov Date: Thu, 10 Aug 2017 11:22:52 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310582 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Frontend/optimization-remark-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Frontend/optimization-remark-options.c b/test/Frontend/optimization-remark-options.c index a2d717a242..38dbbfbacc 100644 --- a/test/Frontend/optimization-remark-options.c +++ b/test/Frontend/optimization-remark-options.c @@ -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]; } -- 2.40.0