The register class checks in the multiply-source predicates was incorrectly using the register number instead of the register class for comparison.
This has slipped through all regression tests because the mulsi3 pattern was expanded with pseudo registers. So the faulty predicate comparison was not executed. The corresponding constraints are correct, though, which ensured that the generated code is correct. gcc/ChangeLog: * config/pru/predicates.md (pru_mulsrc0_operand): Use register class instead of register number for the check. (pru_mulsrc1_operand): Ditto. Signed-off-by: Dimitar Dimitrov <dimi...@dinux.eu> --- gcc/config/pru/predicates.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/pru/predicates.md b/gcc/config/pru/predicates.md index 77b3316b98e..55635599609 100644 --- a/gcc/config/pru/predicates.md +++ b/gcc/config/pru/predicates.md @@ -103,7 +103,7 @@ (define_predicate "pru_mulsrc0_operand" else return 0; - return REGNO_REG_CLASS (regno) == MULSRC0_REGNUM + return REGNO_REG_CLASS (regno) == MULSRC0_REGS || regno >= FIRST_PSEUDO_REGISTER; } return 0; @@ -123,7 +123,7 @@ (define_predicate "pru_mulsrc1_operand" else return 0; - return REGNO_REG_CLASS (regno) == MULSRC1_REGNUM + return REGNO_REG_CLASS (regno) == MULSRC1_REGS || regno >= FIRST_PSEUDO_REGISTER; } return 0; -- 2.45.0