From 83f89c34d17ff83debdd248a49d53884bbdff369 Mon Sep 17 00:00:00 2001
From: Tyler Nowicki <tnowicki@apple.com>
Date: Thu, 20 Aug 2015 17:56:11 -0700
Subject: [PATCH 2/2] Modify runtime mem checking diagnostic to remove
 references to internal details and provide vectorize(enable) as an option.

---
 include/clang/Basic/DiagnosticFrontendKinds.td | 7 ++++---
 test/Frontend/optimization-remark-options.c    | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td
index 5eaeb75..5af9898 100644
--- a/include/clang/Basic/DiagnosticFrontendKinds.td
+++ b/include/clang/Basic/DiagnosticFrontendKinds.td
@@ -50,9 +50,10 @@ def remark_fe_backend_optimization_remark_analysis_fpcommute : Remark<"%0; "
     "before the loop or by providing the compiler option '-ffast-math'.">,
     BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;
 def remark_fe_backend_optimization_remark_analysis_aliasing : Remark<"%0; "
-    "avoid runtime pointer checking when you know the arrays will always be "
-    "independent by specifying '#pragma clang loop vectorize(assume_safety)' "
-    "before the loop or by specifying 'restrict' on the array arguments. "
+    "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!">,
     BackendInfo, InGroup<BackendOptimizationRemarkAnalysis>;
 def warn_fe_backend_optimization_failure : Warning<"%0">, BackendInfo,
diff --git a/test/Frontend/optimization-remark-options.c b/test/Frontend/optimization-remark-options.c
index 8172f16..74fbeaf 100644
--- a/test/Frontend/optimization-remark-options.c
+++ b/test/Frontend/optimization-remark-options.c
@@ -11,7 +11,7 @@ double foo(int N) {
   return v;
 }
 
-// CHECK: {{.*}}:18:13: remark: loop not vectorized: cannot prove it is safe to reorder memory operations; avoid runtime pointer checking when you know the arrays will always be independent by specifying '#pragma clang loop vectorize(assume_safety)' before the loop or by specifying 'restrict' on the array arguments. Erroneous results will occur if these options are incorrectly applied!
+// CHECK: {{.*}}:18:13: 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++) {
-- 
2.3.2 (Apple Git-55)

