public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC
@ 2006-01-04 8:41 halcy0n at gentoo dot org
2006-01-04 14:37 ` [Bug target/25662] [4.0/4.1 " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: halcy0n at gentoo dot org @ 2006-01-04 8:41 UTC (permalink / raw)
To: gcc-bugs
The following testcase works on PPC with gcc-3.4, but fails with >=4.0.
__extension__ typedef unsigned long long guint64;
typedef int gint;
typedef gint gboolean;
typedef struct
{
guint64 rte;
} mainwindow;
mainwindow *mainw;
static int bg_gen_to_start;
gboolean weed_playback_gen_start (void)
{
bg_gen_to_start = -1;
if (mainw->rte & (((guint64) 1) << bg_gen_to_start))
mainw->rte ^= (((guint64) 1) << bg_gen_to_start);
}
The error with mainline (only reproducible with atleast -O):
test.c: In function 'weed_playback_gen_start':
test.c:18: error: unrecognizable insn:
(insn 37 36 39 2 (set (subreg:SI (reg:DI 119 [ D.1305 ]) 4)
(ashift:SI (const_int 1 [0x1])
(const_int -1 [0xffffffffffffffff]))) -1 (nil)
(nil))
test.c:18: internal compiler error: in extract_insn, at recog.c:2084
--
Summary: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on
PPC
Product: gcc
Version: 4.0.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: halcy0n at gentoo dot org
GCC build triplet: powerpc-unknown-linux-gnu
GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
@ 2006-01-04 14:37 ` pinskia at gcc dot gnu dot org
2006-01-05 8:40 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-04 14:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-01-04 14:37 -------
This works on the mainline as of today but failed with 4.2.0 20051219.
Confirmed. Though I should note this is really weird as DOM is messing up in
that version of GCC and we still have 1 << -1 which is not being folded.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |critical
Component|middle-end |target
Known to fail|4.0.3 4.1.0 4.2.0 |4.0.3 4.1.0
Known to work|3.4.5 |3.4.5 4.2.0
Summary|[4.0/4.1/4.2 Regression] |[4.0/4.1 Regression]
|Unrecognizable insn with -O |Unrecognizable insn with -O
|on PPC |on PPC
Target Milestone|--- |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
2006-01-04 14:37 ` [Bug target/25662] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-01-05 8:40 ` jakub at gcc dot gnu dot org
2006-01-06 19:05 ` ian at airs dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-01-05 8:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2006-01-05 08:40 -------
Note that the code has undefined behaviour.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
2006-01-04 14:37 ` [Bug target/25662] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-01-05 8:40 ` jakub at gcc dot gnu dot org
@ 2006-01-06 19:05 ` ian at airs dot com
2006-01-06 19:06 ` ian at airs dot com
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2006-01-06 19:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from ian at airs dot com 2006-01-06 19:05 -------
I think this is a bug in simplify_expand_binop (adding Richard Sandiford to the
CC since he introduced that function). Currently when simplify_expand_binop is
given two constants, it calls simplify_gen_binary. When the operation does not
simplify, that will wind up returning RTL which may not satisfy the instruction
predicates.
I think it should call simplify_binary_operation instead. If that fails, it
should call expand_binop as usual.
I will attach a sample, untested, patch.
--
ian at airs dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |richard at codesourcery dot
| |com, ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (2 preceding siblings ...)
2006-01-06 19:05 ` ian at airs dot com
@ 2006-01-06 19:06 ` ian at airs dot com
2006-01-06 20:18 ` dje at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2006-01-06 19:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from ian at airs dot com 2006-01-06 19:06 -------
Created an attachment (id=10590)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10590&action=view)
Sample untested patch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (3 preceding siblings ...)
2006-01-06 19:06 ` ian at airs dot com
@ 2006-01-06 20:18 ` dje at gcc dot gnu dot org
2006-01-06 20:54 ` halcy0n at gentoo dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-06 20:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dje at gcc dot gnu dot org 2006-01-06 20:18 -------
The patched compiler does build and does fix the testcase.
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dje at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-01-06 20:18:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (4 preceding siblings ...)
2006-01-06 20:18 ` dje at gcc dot gnu dot org
@ 2006-01-06 20:54 ` halcy0n at gentoo dot org
2006-01-07 22:23 ` dje at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: halcy0n at gentoo dot org @ 2006-01-06 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from halcy0n at gentoo dot org 2006-01-06 20:54 -------
I can confirm it fixes it on my box as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (5 preceding siblings ...)
2006-01-06 20:54 ` halcy0n at gentoo dot org
@ 2006-01-07 22:23 ` dje at gcc dot gnu dot org
2006-01-08 20:54 ` dje at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-07 22:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dje at gcc dot gnu dot org 2006-01-07 22:23 -------
Subject: Bug 25662
Author: dje
Date: Sat Jan 7 22:23:27 2006
New Revision: 109456
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109456
Log:
2005-01-07 Ian Lance Taylor <ian@airs.com>
David Edelsohn <edelsohn@gnu.org>
PR rtl-optimization/25662
* optabs.c (simplify_expand_binop): Use simplify_binary_operation
for constant operands instead of simplify_gen_binary.
* simplify-rtx.c (simplify_gen_binary): Swap commutative operands
after trying simplify_binary_operation
Modified:
trunk/gcc/ChangeLog
trunk/gcc/optabs.c
trunk/gcc/simplify-rtx.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (6 preceding siblings ...)
2006-01-07 22:23 ` dje at gcc dot gnu dot org
@ 2006-01-08 20:54 ` dje at gcc dot gnu dot org
2006-01-08 20:55 ` dje at gcc dot gnu dot org
2006-01-09 2:19 ` dje at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-08 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dje at gcc dot gnu dot org 2006-01-08 20:54 -------
Subject: Bug 25662
Author: dje
Date: Sun Jan 8 20:54:28 2006
New Revision: 109476
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109476
Log:
2006-01-08 Ian Lance Taylor <ian@airs.com>
David Edelsohn <edelsohn@gnu.org>
PR rtl-optimization/25662
* optabs.c (simplify_expand_binop): Use simplify_binary_operation
for constant operands instead of simplify_gen_binary.
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/optabs.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (7 preceding siblings ...)
2006-01-08 20:54 ` dje at gcc dot gnu dot org
@ 2006-01-08 20:55 ` dje at gcc dot gnu dot org
2006-01-09 2:19 ` dje at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-08 20:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dje at gcc dot gnu dot org 2006-01-08 20:55 -------
Subject: Bug 25662
Author: dje
Date: Sun Jan 8 20:55:39 2006
New Revision: 109477
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109477
Log:
2006-01-08 Ian Lance Taylor <ian@airs.com>
David Edelsohn <edelsohn@gnu.org>
PR rtl-optimization/25662
* optabs.c (simplify_expand_binop): Use simplify_binary_operation
for constant operands instead of simplify_gen_binary.
Modified:
branches/gcc-4_0-branch/gcc/ChangeLog
branches/gcc-4_0-branch/gcc/optabs.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/25662] [4.0/4.1 Regression] Unrecognizable insn with -O on PPC
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
` (8 preceding siblings ...)
2006-01-08 20:55 ` dje at gcc dot gnu dot org
@ 2006-01-09 2:19 ` dje at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu dot org @ 2006-01-09 2:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from dje at gcc dot gnu dot org 2006-01-09 02:19 -------
Fix committed to all mainline, 4.1, 4.0.
--
dje at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25662
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-01-09 2:19 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-04 8:41 [Bug middle-end/25662] New: [4.0/4.1/4.2 Regression] Unrecognizable insn with -O on PPC halcy0n at gentoo dot org
2006-01-04 14:37 ` [Bug target/25662] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-01-05 8:40 ` jakub at gcc dot gnu dot org
2006-01-06 19:05 ` ian at airs dot com
2006-01-06 19:06 ` ian at airs dot com
2006-01-06 20:18 ` dje at gcc dot gnu dot org
2006-01-06 20:54 ` halcy0n at gentoo dot org
2006-01-07 22:23 ` dje at gcc dot gnu dot org
2006-01-08 20:54 ` dje at gcc dot gnu dot org
2006-01-08 20:55 ` dje at gcc dot gnu dot org
2006-01-09 2:19 ` dje 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).