On 11/18/23 22:40, Maciej W. Rozycki wrote:
Code in `riscv_expand_conditional_move' for Ventana and Zicond targets
seems like bolted on as an afterthought rather than properly merged so
as to handle all the cases together.
You could characterize it that way. It was mostly a desire to not muck
up any of the thead or sfb code which I know next to nothing about. I
think with the improvements in the testsuite from your series it's a lot
more feasible to unify the implementations and be sure we haven't broken
something along the way.
Fold the existing code pieces together then (observing that for short
forward branch targets no integer comparisons need to be canonicalized),
letting T-Head targets produce branchless sequences for all the integer
comparisons rather than for equality ones only, and preparing for the
handling of floating-point comparisons here across all conditional-move
targets.
gcc/
* config/riscv/riscv.cc (riscv_expand_conditional_move): Unify
conditional-move handling across all the relevant targets.
OK
jeff