public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65283] New: [SH] lds fpscr not put in delay slot
@ 2015-03-02 21:32 olegendo at gcc dot gnu.org
2015-05-21 13:24 ` [Bug target/65283] " olegendo at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-02 21:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
Bug ID: 65283
Summary: [SH] lds fpscr not put in delay slot
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Target: sh*-*-*
Compiling this example:
float test (float a, float b)
{
return a + b;
}
with -O2 -m4 -ml results in:
sts fpscr,r1
mov.l .L3,r2
xor r2,r1
lds r1,fpscr
fmov fr5,fr0
fadd fr4,fr0
sts fpscr,r1
xor r2,r1
lds r1,fpscr
rts
nop
The problem is that the lds_fpscr insn is a multiple-set insn and thus the
delay-branch pass will not consider it.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/65283] [SH] lds fpscr not put in delay slot
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
@ 2015-05-21 13:24 ` olegendo at gcc dot gnu.org
2015-05-21 13:37 ` chrbr at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-05-21 13:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-05-21
Ever confirmed|0 |1
--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
BTW, the SH4A fpchg insn has the same problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/65283] [SH] lds fpscr not put in delay slot
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
2015-05-21 13:24 ` [Bug target/65283] " olegendo at gcc dot gnu.org
@ 2015-05-21 13:37 ` chrbr at gcc dot gnu.org
2015-05-21 13:53 ` olegendo at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-05-21 13:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chrbr at gcc dot gnu.org
--- Comment #2 from chrbr at gcc dot gnu.org ---
this is a conservative limitation to avoid a ds schedule problem.
this is because
(define_attr "in_delay_slot" "yes,no"
(eq_attr "type" "fpscr_toggle") (const_string "no")
an old analysis (for reference) and regression test:
https://gcc.gnu.org/ml/gcc-patches/2007-01/msg00746.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/65283] [SH] lds fpscr not put in delay slot
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
2015-05-21 13:24 ` [Bug target/65283] " olegendo at gcc dot gnu.org
2015-05-21 13:37 ` chrbr at gcc dot gnu.org
@ 2015-05-21 13:53 ` olegendo at gcc dot gnu.org
2015-05-21 13:56 ` chrbr at gcc dot gnu.org
2015-05-21 14:02 ` chrbr at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-05-21 13:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Thanks for the pointer.
Still, if this
(define_attr "in_delay_slot" "yes,no"
(eq_attr "type" "fpscr_toggle") (const_string "no")
is changed to "yes", the delay-branch will not consider multiple-set insns.
The "toggle_pr" insn used to be a single set, but now is a multiple-set.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/65283] [SH] lds fpscr not put in delay slot
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
` (2 preceding siblings ...)
2015-05-21 13:53 ` olegendo at gcc dot gnu.org
@ 2015-05-21 13:56 ` chrbr at gcc dot gnu.org
2015-05-21 14:02 ` chrbr at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-05-21 13:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
--- Comment #4 from chrbr at gcc dot gnu.org ---
yes it's only for the SH4A fpchg case
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/65283] [SH] lds fpscr not put in delay slot
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
` (3 preceding siblings ...)
2015-05-21 13:56 ` chrbr at gcc dot gnu.org
@ 2015-05-21 14:02 ` chrbr at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: chrbr at gcc dot gnu.org @ 2015-05-21 14:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65283
--- Comment #5 from chrbr at gcc dot gnu.org ---
ah I see, I was on the 4.8 where toggle_pr was indeed a single pattern.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-05-21 14:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-02 21:32 [Bug target/65283] New: [SH] lds fpscr not put in delay slot olegendo at gcc dot gnu.org
2015-05-21 13:24 ` [Bug target/65283] " olegendo at gcc dot gnu.org
2015-05-21 13:37 ` chrbr at gcc dot gnu.org
2015-05-21 13:53 ` olegendo at gcc dot gnu.org
2015-05-21 13:56 ` chrbr at gcc dot gnu.org
2015-05-21 14:02 ` chrbr at gcc dot gnu.org
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).