diff --git a/test/Misc/backend-optimization-failure-nodbg.cpp b/test/Misc/backend-optimization-failure-nodbg.cpp index 1e847185e81caff118a7d861e8f46002502796a8..aba37de231af3c57d54ea72b5f2a4ff97bdbfc22 100644 --- a/test/Misc/backend-optimization-failure-nodbg.cpp +++ b/test/Misc/backend-optimization-failure-nodbg.cpp @@ -4,7 +4,7 @@ // Test verifies optimization failures generated by the backend are handled // correctly by clang. LLVM tests verify all of the failure conditions. -void test_switch(int *A, int *B, int Length) { /* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ +void test_switch(int *A, int *B, int Length, int J) { /* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ #pragma clang loop vectorize(enable) unroll(disable) for (int i = 0; i < Length; i++) { switch (A[i]) { @@ -12,7 +12,7 @@ void test_switch(int *A, int *B, int Length) { /* expected-warning {{loop not ve B[i] = 1; break; case 1: - B[i] = 2; + B[J] = 2; break; default: B[i] = 3; diff --git a/test/Misc/backend-optimization-failure.cpp b/test/Misc/backend-optimization-failure.cpp index bb50e96aaa57832bfb23eba6d0627a7e739a2adb..1657c0cb91d5f52d379eecdc067d9cf270f18fea 100644 --- a/test/Misc/backend-optimization-failure.cpp +++ b/test/Misc/backend-optimization-failure.cpp @@ -4,7 +4,7 @@ // Test verifies optimization failures generated by the backend are handled // correctly by clang. LLVM tests verify all of the failure conditions. -void test_switch(int *A, int *B, int Length) { +void test_switch(int *A, int *B, int Length,int J) { #pragma clang loop vectorize(enable) unroll(disable) for (int i = 0; i < Length; i++) { /* expected-warning@-1 {{loop not vectorized: failed explicitly specified loop vectorization}} */ switch (A[i]) { @@ -12,7 +12,7 @@ void test_switch(int *A, int *B, int Length) { B[i] = 1; break; case 1: - B[i] = 2; + B[J] = 2; break; default: B[i] = 3;