[AArch64] Fix gcc.target/aarch64/vclz.c
authorAlan Lawrence <alan.lawrence@arm.com>
Mon, 16 Nov 2015 12:41:20 +0000 (12:41 +0000)
committerAlan Lawrence <alalaw01@gcc.gnu.org>
Mon, 16 Nov 2015 12:41:20 +0000 (12:41 +0000)
* gcc.target/aarch64/vclz.c: Correctly place INHIB_OPTIMIZATION.

From-SVN: r230421

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/vclz.c

index fb10a8b644d446ee565b6663524c93f539440331..82402bf8eaa8dd2b180a267ef935b6cb36bca38e 100644 (file)
@@ -1,3 +1,7 @@
+2015-11-16  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * gcc.target/aarch64/vclz.c: Correctly place INHIB_OPTIMIZATION.
+
 2015-11-16  Christian Bruel  <christian.bruel@st.com>
 
        * lib/target-supports.exp (check_effective_target_arm_neon_ok_nocache):
index 455ba637b482ca8c3e583346febb9d1c042f933c..60494a88de8704cad52012b47e02afc7e7c751a7 100644 (file)
@@ -67,18 +67,13 @@ extern void abort (void);
   CONCAT1 (vclz, POSTFIX (reg_len, data_len, is_signed))
 
 #define RUN_TEST(test_set, answ_set, reg_len, data_len, is_signed, n)  \
+  INHIB_OPTIMIZATION;                                                  \
   a = LOAD_INST (reg_len, data_len, is_signed) (test_set);             \
   b = LOAD_INST (reg_len, data_len, is_signed) (answ_set);             \
-  INHIB_OPTIMIZATION;                                                  \
   a = CLZ_INST (reg_len, data_len, is_signed) (a);                     \
   for (i = 0; i < n; i++)                                              \
-    {                                                                  \
-      INHIB_OPTIMIZATION;                                              \
-      if (a [i] != b [i])                                              \
-        {                                                              \
-          return 1;                                                    \
-        }                                                              \
-    }
+    if (a [i] != b [i])                                                        \
+      return 1;
 
 int
 test_vclz_s8 ()