public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type @ 2005-07-29 15:30 amylaar at gcc dot gnu dot org 2005-07-29 16:02 ` [Bug middle-end/23135] " amylaar at gcc dot gnu dot org ` (5 more replies) 0 siblings, 6 replies; 8+ messages in thread From: amylaar at gcc dot gnu dot org @ 2005-07-29 15:30 UTC (permalink / raw) To: gcc-bugs I've added a movti expander to sh.md, and found a regression for -m4 -ml on simd-1.c with optimization options -O1, -O2, -O3 and -Os . I've foun that a output reload address was being overwritten by a secondary output reload. The secondary output reload had RELOAD_FOR_OUTPUT_ADDRESS, and the address reload had RELOAD_FOR_OUTADDR_ADDRESS, both for the same operand. In the absence of a seond RELOAD_FOR_OUTPUT_ADDRESS reload, these types are not supposed to conflict. The output address reload should have used RELOAD_FOR_OUTPUT_ADDRESS. -- Summary: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P2 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amylaar at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org @ 2005-07-29 16:02 ` amylaar at gcc dot gnu dot org 2005-07-29 16:22 ` amylaar at gcc dot gnu dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: amylaar at gcc dot gnu dot org @ 2005-07-29 16:02 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From amylaar at gcc dot gnu dot org 2005-07-29 15:29 ------- Created an attachment (id=9385) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9385&action=view) context & patch These are the patches that exposed the latent bug for sh-elf, together with the reload bug fix. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org 2005-07-29 16:02 ` [Bug middle-end/23135] " amylaar at gcc dot gnu dot org @ 2005-07-29 16:22 ` amylaar at gcc dot gnu dot org 2005-07-31 3:44 ` pinskia at gcc dot gnu dot org ` (3 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: amylaar at gcc dot gnu dot org @ 2005-07-29 16:22 UTC (permalink / raw) To: gcc-bugs -- What |Removed |Added ---------------------------------------------------------------------------- URL| |http://gcc.gnu.org/ml/gcc- | |patches/2005- | |07/msg01968.html Keywords| |patch http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org 2005-07-29 16:02 ` [Bug middle-end/23135] " amylaar at gcc dot gnu dot org 2005-07-29 16:22 ` amylaar at gcc dot gnu dot org @ 2005-07-31 3:44 ` pinskia at gcc dot gnu dot org 2005-08-02 14:48 ` joern dot rennecke at st dot com ` (2 subsequent siblings) 5 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-07-31 3:44 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-31 02:43 ------- Confirmed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-07-31 02:43:04 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org ` (2 preceding siblings ...) 2005-07-31 3:44 ` pinskia at gcc dot gnu dot org @ 2005-08-02 14:48 ` joern dot rennecke at st dot com 2005-08-05 16:06 ` cvs-commit at gcc dot gnu dot org 2005-08-05 16:50 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 8+ messages in thread From: joern dot rennecke at st dot com @ 2005-08-02 14:48 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From joern dot rennecke at st dot com 2005-08-02 14:47 ------- Subject: Re: - RFA: fix PR middle-end/23135: synthetic testcase I have attached a testcase that triggers the bug on mainline for sh-elf -m4 -O2. /* Based on execute/simd-1.c, modifed by joern.rennecke@st.com to trigger a reload bug. Verified for gcc mainline from 20050722 13:00 UTC for sh-elf -m4 -O2. */ #ifndef STACK_SIZE #define STACK_SIZE (256*1024) #endif typedef struct { char c[STACK_SIZE/2]; } big_t; typedef int __attribute__((vector_size (8))) vecint; typedef int __attribute__((mode(SI))) siint; vecint i = { 150, 100 }; vecint j = { 10, 13 }; vecint k; union { vecint v; siint i[2]; } res; void verify (siint a1, siint a2, siint b1, siint b2, big_t big) { if (a1 != b1 || a2 != b2) abort (); } int main () { big_t big; vecint k0, k1, k2, k3, k4, k5, k6, k7; k0 = i + j; res.v = k0; verify (res.i[0], res.i[1], 160, 113, big); k1 = i * j; res.v = k1; verify (res.i[0], res.i[1], 1500, 1300, big); k2 = i / j; /* This is the observed failure - reload 0 has the wrong type and thus the conflict with reload 1 is missed: (insn:HI 94 92 96 1 pr23135.c:46 (parallel [ (set (subreg:SI (reg:DI 253) 0) (div:SI (reg:SI 4 r4) (reg:SI 5 r5))) (clobber (reg:SI 146 pr)) (clobber (reg:DF 64 fr0)) (clobber (reg:DF 66 fr2)) (use (reg:PSI 151 )) (use (reg/f:SI 256)) ]) 60 {divsi3_i4} (insn_list:REG_DEP_TRUE 90 (insn_list:REG_DEP_TRUE 89 (insn_list:REG_DEP_TRUE 42 (insn_list:REG_DEP_TRUE 83 (insn_list:REG_DEP_TRUE 92 (insn_list:REG_DEP_TRUE 91 (nil))))))) (expr_list:REG_DEAD (reg:SI 4 r4) (expr_list:REG_DEAD (reg:SI 5 r5) (expr_list:REG_UNUSED (reg:DF 66 fr2) (expr_list:REG_UNUSED (reg:DF 64 fr0) (expr_list:REG_UNUSED (reg:SI 146 pr) (insn_list:REG_RETVAL 91 (nil)))))))) Reloads for insn # 94 Reload 0: reload_in (SI) = (plus:SI (reg/f:SI 14 r14) (const_int 64 [0x40])) GENERAL_REGS, RELOAD_FOR_OUTADDR_ADDRESS (opnum = 0) reload_in_reg: (plus:SI (reg/f:SI 14 r14) (const_int 64 [0x40])) reload_reg_rtx: (reg:SI 3 r3) Reload 1: GENERAL_REGS, RELOAD_FOR_OUTPUT_ADDRESS (opnum = 0), can't combine, se condary_reload_p reload_reg_rtx: (reg:SI 3 r3) Reload 2: reload_out (SI) = (mem:SI (plus:SI (plus:SI (reg/f:SI 14 r14) (const_int 64 [0x40])) (const_int 28 [0x1c])) [ 16 S8 A32]) FPUL_REGS, RELOAD_FOR_OUTPUT (opnum = 0) reload_out_reg: (subreg:SI (reg:DI 253) 0) reload_reg_rtx: (reg:SI 150 fpul) secondary_out_reload = 1 Reload 3: reload_in (SI) = (symbol_ref:SI ("__sdivsi3_i4") [flags 0x1]) GENERAL_REGS, RELOAD_FOR_INPUT (opnum = 1), can't combine reload_in_reg: (reg/f:SI 256) reload_reg_rtx: (reg:SI 3 r3) */ res.v = k2; verify (res.i[0], res.i[1], 15, 7, big); k3 = i & j; res.v = k3; verify (res.i[0], res.i[1], 2, 4, big); k4 = i | j; res.v = k4; verify (res.i[0], res.i[1], 158, 109, big); k5 = i ^ j; res.v = k5; verify (res.i[0], res.i[1], 156, 105, big); k6 = -i; res.v = k6; verify (res.i[0], res.i[1], -150, -100, big); k7 = ~i; res.v = k7; verify (res.i[0], res.i[1], -151, -101, big); k = k0 + k1 + k3 + k4 + k5 + k6 + k7; res.v = k; verify (res.i[0], res.i[1], 1675, 1430, big); k = k0 * k1 * k3 * k4 * k5 * k6 * k7; res.v = k; verify (res.i[0], res.i[1], 1456467968, -1579586240, big); k = k0 / k1 / k2 / k3 / k4 / k5 / k6 / k7; res.v = k; verify (res.i[0], res.i[1], 0, 0, big); exit (0); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org ` (3 preceding siblings ...) 2005-08-02 14:48 ` joern dot rennecke at st dot com @ 2005-08-05 16:06 ` cvs-commit at gcc dot gnu dot org 2005-08-05 16:50 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 8+ messages in thread From: cvs-commit at gcc dot gnu dot org @ 2005-08-05 16:06 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-05 16:06 ------- Subject: Bug 23135 CVSROOT: /cvs/gcc Module name: gcc Changes by: amylaar@gcc.gnu.org 2005-08-05 16:06:35 Modified files: gcc : ChangeLog reload.c Log message: PR middle-end/23135 * reload.c (find_reloads_subreg_address): Pass down TYPE unchanged. Change all callers except find_reloads_toplev. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9663&r2=2.9664 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload.c.diff?cvsroot=gcc&r1=1.274&r2=1.275 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org ` (4 preceding siblings ...) 2005-08-05 16:06 ` cvs-commit at gcc dot gnu dot org @ 2005-08-05 16:50 ` pinskia at gcc dot gnu dot org 5 siblings, 0 replies; 8+ messages in thread From: pinskia at gcc dot gnu dot org @ 2005-08-05 16:50 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-05 16:50 ------- Fixed. -- What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <bug-23135-5394@http.gcc.gnu.org/bugzilla/>]
* [Bug middle-end/23135] find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type [not found] <bug-23135-5394@http.gcc.gnu.org/bugzilla/> @ 2006-04-22 0:44 ` dalej at gcc dot gnu dot org 0 siblings, 0 replies; 8+ messages in thread From: dalej at gcc dot gnu dot org @ 2006-04-22 0:44 UTC (permalink / raw) To: gcc-bugs ------- Comment #6 from dalej at gcc dot gnu dot org 2006-04-22 00:44 ------- Subject: Bug 23135 Author: dalej Date: Sat Apr 22 00:44:01 2006 New Revision: 113164 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113164 Log: 2005-04-21 Dale Johannesen <dalej@apple.com> Radar 4506160 Bring in Joern Rennecke's fix from mainline: PR middle-end/23135 * reload.c (find_reloads_subreg_address): Pass down TYPE unchanged. Change all callers except find_reloads_toplev. Modified: branches/apple-local-200502-branch/gcc/ChangeLog.apple-ppc branches/apple-local-200502-branch/gcc/reload.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23135 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-04-22 0:44 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-07-29 15:30 [Bug middle-end/23135] New: find_reloads_toplev -> find_reloads_subreg_address uses wrong reload type amylaar at gcc dot gnu dot org 2005-07-29 16:02 ` [Bug middle-end/23135] " amylaar at gcc dot gnu dot org 2005-07-29 16:22 ` amylaar at gcc dot gnu dot org 2005-07-31 3:44 ` pinskia at gcc dot gnu dot org 2005-08-02 14:48 ` joern dot rennecke at st dot com 2005-08-05 16:06 ` cvs-commit at gcc dot gnu dot org 2005-08-05 16:50 ` pinskia at gcc dot gnu dot org [not found] <bug-23135-5394@http.gcc.gnu.org/bugzilla/> 2006-04-22 0:44 ` dalej at gcc dot gnu dot 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).