]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH v3] [RISC-V] Generate Zicond instruction for select pattern with condition...
authorXiao Zeng <zengxiao@eswincomputing.com>
Fri, 4 Aug 2023 21:23:56 +0000 (17:23 -0400)
committerJeff Law <jeffreyalaw@gmail.com>
Fri, 4 Aug 2023 21:25:30 +0000 (17:25 -0400)
commit4e87c953d16377457b31b65b6c3268d932e462ab
tree1939101c7e43009547e4705937a0642339a1ab6e
parent021077b94741c9300dfff3a24e95b3ffa3f508a7
[PATCH v3] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

This patch recognizes Zicond patterns when the select pattern
with condition eq or neq to 0 (using eq as an example), namely:

1 rd = (rs2 == 0) ? non-imm : 0
2 rd = (rs2 == 0) ? non-imm : non-imm
3 rd = (rs2 == 0) ? reg : non-imm
4 rd = (rs2 == 0) ? reg : reg

gcc/ChangeLog:

* config/riscv/riscv.cc (riscv_expand_conditional_move): Recognize
more Zicond patterns.  Fix whitespace typo.
(riscv_rtx_costs): Remove accidental code duplication.

Co-authored-by: Jeff Law <jlaw@ventanamicro.com>
gcc/config/riscv/riscv.cc