Skip to content
Snippets Groups Projects
Commit db08a096 authored by Jeff Law's avatar Jeff Law
Browse files

[committed] Fix subdi3 synthesis on rx port

Some of Andrew's recent match.pd changes triggered a regression in my tester
for the rx processor for c-torture/execute/pr66940.c which would be exposed
only during an LTO compilation.

Specifically the subdi3_internal pattern had the wrong idiom to detect a carry
from the high word into the low word.  It had the wrong opcode and the operands
were reversed.

This resulted in combine doing a simplification that was valid according to the
presented RTL, but which ultimately got the wrong result.

I would often say this was a latent bug.  But the testsuite shows
builtin-arith-overflow-14 and builtin-arith-overflow-p18 failures are fixed as
well.  So it's been visible indefinitely, but nobody's ever looked into those
failures.

Committed to the trunk.

gcc/
	* config/rx/rx.md (subdi3): Fix test for borrow.
parent 5bfb5e77
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