From 8e2eb6039d183b7c571da9eb83b933021c5b29be Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Sat, 8 Jun 2024 16:05:13 +0800 Subject: [PATCH] MIPS/testsuite: add -mno-branch-likely to r10k-cache-barrier-13.c 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c index ee9c84b59882..ac005fb08b34 100644 --- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c +++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c @@ -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. */ -- 2.47.2