From: Sanjoy Das Date: Mon, 2 Mar 2015 21:47:47 +0000 (+0000) Subject: Fix test case. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=876735a67f1fc4f1709985fde4511652d1e9e0df;p=clang Fix test case. r230921 broke backend-optimization-failure.cpp: after r230921, LLVM no longer emits an expression to compute 'Length - 1' and this perturbs LoopSimplify enough to emit the warning on line 10 instead of line 9. This is a review request to fix the test case once I re-land r230921. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231020 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Misc/backend-optimization-failure.cpp b/test/Misc/backend-optimization-failure.cpp index 2ee42b88a1..3e407123ed 100644 --- a/test/Misc/backend-optimization-failure.cpp +++ b/test/Misc/backend-optimization-failure.cpp @@ -6,8 +6,8 @@ void test_switch(int *A, int *B, int Length) { #pragma clang loop vectorize(enable) unroll(disable) - /* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ for (int i = 0; i < Length; i++) { - switch (A[i]) { + for (int i = 0; i < Length; i++) { +/* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ switch (A[i]) { case 0: B[i] = 1; break;