On 12/29/23 10:46, YunQiang Su wrote:
When we try to combine RTLs, the result may be very complex,
and `rtx_cost` may think that it need lots of costs. But in
fact, it may match a pattern in machine descriptions, which
may emit only 1 or 2 hardware instructions. This combination
may be refused due to cost comparison failure.
Then that's a problem with the backend's implementation of RTX_COST.
Since the high cost may be due to a more expsensive operation.
To get real reason, we also need information about instruction
count.
Then cost the *operations*, not the number of instructions. Also note
that a single insn may generate multiple assembler instructions.
Even with all its warts, the real solution here is to fix the port's RTX
costs.
jeff