RISC-V: Fix testsuite regression due to recent IRA changes.
authorKito Cheng <kito.cheng@sifive.com>
Wed, 11 Mar 2020 09:48:10 +0000 (17:48 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 11 Mar 2020 16:57:19 +0000 (00:57 +0800)
After IRA changes, atomic version will use one more register, but
non-atomic still use 2 registers, however this testcase isn't testing for
atomic feature, so I decide change the testcase to always use COUNT++
to test.

ChangeLog

gcc/testsuite/

Kito Cheng  <kito.cheng@sifive.com>

* gcc.target/riscv/interrupt-2.c: Update testcase and expected output.

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/riscv/interrupt-2.c

index 11061adaf18ab74da41cb95230c835520aad8905..e2442fba35a6398f473ce03d5dbf656e1615de3f 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-11  Kito Cheng  <kito.cheng@sifive.com>
+
+       * gcc.target/riscv/interrupt-2.c: Update testcase and expected output.
+
 2020-03-11  Richard Biener  <rguenther@suse.de>
 
        * gcc.dg/torture/20200311-1.c: New testcase.
index 9559007e4aef96022fb2d1d92758cc59b158bf08..82e3fb24e81372ef0eeb72b3c5a5ca8a81f2ab0d 100644 (file)
@@ -8,10 +8,6 @@ foo2 (void)
   INTERRUPT_FLAG = 0;
 
   extern volatile int COUNTER;
-#ifdef __riscv_atomic
-  __atomic_fetch_add (&COUNTER, 1, __ATOMIC_RELAXED);
-#else
   COUNTER++;
-#endif
 }
 /* { dg-final { scan-assembler-times "s\[wd\]\ta\[0-7\],\[0-9\]+\\(sp\\)" 2 } } */