[committed][RISC-V]Don't reject constants in cmov condition
This test is too aggressive. Constants have VOIDmode, so we need to let the through this phase of conditional move support. Fixes several missed conditional moves with the trunk. gcc/ * config/riscv/riscv.cc (riscv_expand_conditional_move): Allow VOIDmode operands to conditional before canonicalization.
This commit is contained in:
parent
adfc236c62
commit
18c453f0e6
1 changed files with 2 additions and 1 deletions
|
@ -3582,7 +3582,8 @@ riscv_expand_conditional_move (rtx dest, rtx op, rtx cons, rtx alt)
|
|||
enforce that so that we don't strip away a sign_extension
|
||||
thinking it is unnecessary. We might consider using
|
||||
riscv_extend_operands if they are not already properly extended. */
|
||||
if (GET_MODE (op0) != word_mode || GET_MODE (op1) != word_mode)
|
||||
if ((GET_MODE (op0) != word_mode && GET_MODE (op0) != VOIDmode)
|
||||
|| (GET_MODE (op1) != word_mode && GET_MODE (op1) != VOIDmode))
|
||||
return false;
|
||||
|
||||
/* Canonicalize the comparison. It must be an equality comparison
|
||||
|
|
Loading…
Add table
Reference in a new issue