Attempt to pacify buildbots after r280217
authorJames Molloy <james.molloy@arm.com>
Wed, 31 Aug 2016 11:01:41 +0000 (11:01 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 31 Aug 2016 11:01:41 +0000 (11:01 +0000)
These clang tests check diagnostics from the backend by giving it an unvectorizable loop. This loop is now vectorized :/

Make it really unvectorizable by making it unprofitable to ifconvert.

llvm-svn: 280220

clang/test/Misc/backend-optimization-failure-nodbg.cpp
clang/test/Misc/backend-optimization-failure.cpp

index 1e84718..aba37de 100644 (file)
@@ -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;
index bb50e96..1657c0c 100644 (file)
@@ -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;