On 1/31/2026 10:33 AM, Alexandre Oliva wrote:
On Jan 31, 2026, Jeffrey Law <[email protected]> wrote:

* gcc.target/riscv/pr116715.c: Drop unchecked arch overrider.
But the whole point of the test would be a test for a bogus code
generation issue with Zbs enabled.
*nod*, I get that is the goal of the test, but between the choices of
skipping the test altogether or testing that alternative codegen
succeeds, for when the target cpu under test doesn't support Zbs, I
can't see why the former would be preferred.  Of course, when the
selected cpu does support the Zbs extension, then the compiler will
generate code to use it and then the test will do what it was originally
meant to do.  That was my reasoning anyway.
Because with Zbs in the arch string actually tests for a real bug we had in the backend.   If you fail to use Zbs, then you have no hope of tripping that bug and thus you've compromised the goal of the test.

Testing without Zbs is of marginal value.  But if you wanted to do that, create a new test with the right dg-options you want to test and #include the original testcase.  But again, IMHO this has very limited value.

Maybe part of the problem here is a misunderstanding of how codegen typically works in the RISC-V world.  In general you get generic code generation unless you specify a -mcpu or -march string on the command line.  You can configure the toolchain with a default -march string, but that's the exception rather than the rule.

Point being without the Zbs in the arch string you're not testing for the bug in question.  If you want to use that test without Zbs, then create a new test.



Jeff

Reply via email to