]> gcc.gnu.org Git - 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 <jlaw@ventanamicro.com>
Mon, 7 Aug 2023 16:09:35 +0000 (10:09 -0600)
commitbd39d38f535fcb51466076c0e569782c69e52f8f
treeb56f0dad03e123a2f5ea83c6893e70cdfc624ca3
parentb27e0f964891f348543debdc0dede6a87a5f3be4
[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>
(cherry picked from commit 4e87c953d16377457b31b65b6c3268d932e462ab)
gcc/config/riscv/riscv.cc
This page took 0.06766 seconds and 6 git commands to generate.