* [PATCH] gcc: m68k: fix PR target/107645
@ 2022-11-11 19:43 Max Filippov
2022-11-12 19:42 ` Jeff Law
0 siblings, 1 reply; 5+ messages in thread
From: Max Filippov @ 2022-11-11 19:43 UTC (permalink / raw)
To: gcc-patches; +Cc: Jeff Law, Andreas Schwab, Max Filippov
gcc/
PR target/107645
* config/m68k/predicates.md (symbolic_operand): Return false
when UNSPEC is under the CONST node.
---
Regtested with --enable-checking=all for target=m68k-linux-uclibc, no
new regressions compared to the compiler built without checking.
Ok for master?
gcc/config/m68k/predicates.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md
index f8dedd9f8375..094a18955534 100644
--- a/gcc/config/m68k/predicates.md
+++ b/gcc/config/m68k/predicates.md
@@ -141,6 +141,8 @@
case CONST:
op = XEXP (op, 0);
+ if (GET_CODE (op) == UNSPEC)
+ return false;
return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
|| GET_CODE (XEXP (op, 0)) == LABEL_REF)
&& GET_CODE (XEXP (op, 1)) == CONST_INT);
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gcc: m68k: fix PR target/107645
2022-11-11 19:43 [PATCH] gcc: m68k: fix PR target/107645 Max Filippov
@ 2022-11-12 19:42 ` Jeff Law
2022-11-13 3:47 ` Max Filippov
0 siblings, 1 reply; 5+ messages in thread
From: Jeff Law @ 2022-11-12 19:42 UTC (permalink / raw)
To: Max Filippov, gcc-patches; +Cc: Andreas Schwab
On 11/11/22 12:43, Max Filippov wrote:
> gcc/
> PR target/107645
> * config/m68k/predicates.md (symbolic_operand): Return false
> when UNSPEC is under the CONST node.
Isn't the underlying object still symbolic though, thus returning false
seems wrong.
insn 342 341 343 35 (set (reg:SI 97)
(mem/u:SI (plus:SI (reg:SI 13 %a5)
(const:SI (unspec:SI [
(symbol_ref:SI
("__gcov_kvp_dynamic_pool_index") [flags 0x40] <var_decl 0x7f9e83fe7cf0
__gcov_kvp_dynamic_pool_index>)
(const_int 0 [0])
] 6))) [0 S4 A8]))
"gcc/libgcc/libgcov.h":472:44 55 {*movsi_m68k2}
(expr_list:REG_EQUAL (symbol_ref:SI
("__gcov_kvp_dynamic_pool_index") [flags 0x40] <var_decl 0x7f9e83fe7cf0
__gcov_kvp_dynamic_pool_index>)
(nil)))
ISTM that we'd need to strip the unspec and process its argument
instead. But maybe I'm missing something.
jeff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-16 12:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 19:43 [PATCH] gcc: m68k: fix PR target/107645 Max Filippov
2022-11-12 19:42 ` Jeff Law
2022-11-13 3:47 ` Max Filippov
2022-11-16 3:33 ` Jeff Law
2022-11-16 12:37 ` Max Filippov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).