From: YunQiang Su Date: Sat, 8 Jun 2024 08:05:13 +0000 (+0800) Subject: MIPS/testsuite: add -mno-branch-likely to r10k-cache-barrier-13.c X-Git-Tag: basepoints/gcc-16~8426 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e2eb6039d183b7c571da9eb83b933021c5b29be;p=thirdparty%2Fgcc.git 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. --- 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 ee9c84b5988..ac005fb08b3 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. */