Skip to content
Snippets Groups Projects
Commit 4e87c953 authored by Xiao Zeng's avatar Xiao Zeng Committed by Jeff Law
Browse files

[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: default avatarJeff Law <jlaw@ventanamicro.com>
parent 021077b9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment