]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
MIPS/testsuite: add -mno-branch-likely to r10k-cache-barrier-13.c
authorYunQiang Su <syq@gcc.gnu.org>
Sat, 8 Jun 2024 08:05:13 +0000 (16:05 +0800)
committerYunQiang Su <syq@gcc.gnu.org>
Mon, 10 Jun 2024 06:42:42 +0000 (14:42 +0800)
In mips.cc(mips_reorg_process_insns), there is this claim:

    Also delete cache barriers if the last instruction
    was an annulled branch.  INSN will not be speculatively
    executed.

And with -O1 on mips64, we can generate binary code like this,
which fails this test.

gcc/testsuite
* gcc.target/mips/r10k-cache-barrier-13.c: Add -mno-branch-likely
option.

gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c

index ee9c84b59882a3af9e5fcb8cee2ff972d2741fe0..ac005fb08b343c9ea3ddd0aa0ed8d8db12be9115 100644 (file)
@@ -1,4 +1,4 @@
-/* { dg-options "-mr10k-cache-barrier=store" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-branch-likely" } */
 
 /* Test that indirect calls are protected.  */