aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <jlaw@ventanamicro.com>2023-08-11 15:52:57 -0600
committerJeff Law <jlaw@ventanamicro.com>2023-08-11 15:54:12 -0600
commitdb08a096e4b19b91a7ec64f31a45549bb1f077ff (patch)
tree6b5f032ac19ff53cbf6aec0248a31f754b018dd6
parent5bfb5e772f6cf121563f08d27d2c652ea469bbfb (diff)
downloadgcc-db08a096e4b19b91a7ec64f31a45549bb1f077ff.zip
gcc-db08a096e4b19b91a7ec64f31a45549bb1f077ff.tar.gz
gcc-db08a096e4b19b91a7ec64f31a45549bb1f077ff.tar.bz2
[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.
-rw-r--r--gcc/config/rx/rx.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md
index 6959c60..f6b13b9 100644
--- a/gcc/config/rx/rx.md
+++ b/gcc/config/rx/rx.md
@@ -1722,7 +1722,7 @@
(minus:SI
(match_operand:SI 4 "register_operand" " 1, 1")
(match_operand:SI 5 "rx_compare_operand" " rQ,rQ"))
- (geu:SI (match_dup 2) (match_dup 3))))
+ (gtu:SI (match_dup 3) (match_dup 2))))
(clobber (reg:CC CC_REG))]
""
"#"