]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RISC-V][V2] Fix incorrect if-then-else nesting of Zbs usage in constant synthesis
authorJeff Law <jlaw@ventanamicro.com>
Wed, 8 May 2024 19:44:00 +0000 (13:44 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Wed, 8 May 2024 19:44:00 +0000 (13:44 -0600)
commit1c234097487927a4388ddcc690b63597bb3a90dc
tree45ea0f51f01184691c615f1c9fcc52c00a6f7621
parentde4eea7d7ea86e54843507c68d6672eca9d8c7bb
[RISC-V][V2] Fix incorrect if-then-else nesting of Zbs usage in constant synthesis

Reposting without the patch that ignores whitespace.  The CI system doesn't
like including both patches, that'll generate a failure to apply and none of
the tests actually get run.

So I managed to goof the if-then-else level of the bseti bits last week.  They
were supposed to be a last ditch effort to improve the result, but ended up
inside a conditional where they don't really belong.  I almost always use Zba,
Zbb and Zbs together, so it slipped by.

So it's NFC if you always test with Zbb and Zbs enabled together.  But if you
enabled Zbs without Zbb you'd see a failure to use bseti.

gcc/
* config/riscv/riscv.cc (riscv_build_integer_1): Fix incorrect
if-then-else nesting of Zbs code.
gcc/config/riscv/riscv.cc