Bug 84209 - [avr] Don't split SP in split2
Summary: [avr] Don't split SP in split2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 7.0
: P4 normal
Target Milestone: 7.4
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2018-02-05 10:22 UTC by Georg-Johann Lay
Modified: 2018-03-07 18:29 UTC (History)
0 users

See Also:
Host:
Target: avr
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-02-05 00:00:00


Attachments
Proposed patch against v7 (437 bytes, patch)
2018-02-05 11:51 UTC, Georg-Johann Lay
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Georg-Johann Lay 2018-02-05 10:22:38 UTC
Since r242907 there is a split for HI moved that might also split SP.  This might lead to wrong code.

Using -fdisable-rtl-split2 might do as a work-around.
Comment 1 Georg-Johann Lay 2018-02-05 11:51:14 UTC
Created attachment 43338 [details]
Proposed patch against v7
Comment 2 denisc 2018-02-07 10:00:24 UTC
Author: denisc
Date: Wed Feb  7 09:59:52 2018
New Revision: 257440

URL: https://gcc.gnu.org/viewcvs?rev=257440&root=gcc&view=rev
Log:
	PR target/84209
	* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
	* config/avr/avr.md: Only post-reload split REG-REG moves if
	either register is REGERAL_REG_P.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/avr/avr.h
    trunk/gcc/config/avr/avr.md
Comment 3 denisc 2018-03-07 09:13:44 UTC
Author: denisc
Date: Wed Mar  7 09:13:12 2018
New Revision: 258315

URL: https://gcc.gnu.org/viewcvs?rev=258315&root=gcc&view=rev
Log:
	Backport from mainline
	2018-02-07  Georg-Johann Lay  <avr@gjlay.de>

	PR target/84209
	* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
	* config/avr/avr.md: Only post-reload split REG-REG moves if
	either register is GENERAL_REG_P.


Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/config/avr/avr.h
    branches/gcc-7-branch/gcc/config/avr/avr.md
Comment 4 Georg-Johann Lay 2018-03-07 18:29:41 UTC
Fixed in v7.4+