public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 @ 2012-05-15 9:57 jakub at gcc dot gnu.org 2012-05-15 10:14 ` [Bug target/53358] " jakub at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 9:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 Bug #: 53358 Summary: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target AssignedTo: jakub@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org Target: i?86-* /* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-additional-options "-fpic" { target fpic } } */ /* { dg-additional-options "-mtune=pentium4" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ struct S { unsigned char s, t[17]; }; int bar (void); void foo (struct S *x) { unsigned char i, z; if (bar ()) { z = bar (); bar (); x->s += z; for (i = 0; i < x->s; i++) x->t[i] = bar (); } } ICEs with: rh821223.i: In function 'foo': rh821223.i:21:1: error: insn does not satisfy its constraints: (insn 77 22 27 3 (parallel [ (set (reg:CCZ 17 flags) (compare:CCZ (plus:QI (mem:QI (reg/v/f:SI 4 si [orig:72 x ] [72]) [0 x_5(D)->s+0 S1 A8]) (reg:QI 5 di [orig:63 D.1372 ] [63])) (const_int 0 [0]))) (set (mem:QI (reg/v/f:SI 4 si [orig:72 x ] [72]) [0 x_5(D)->s+0 S1 A8]) (plus:QI (mem:QI (reg/v/f:SI 4 si [orig:72 x ] [72]) [0 x_5(D)->s+0 S1 A8]) (reg:QI 5 di [orig:63 D.1372 ] [63]))) ]) rh821223.i:18 259 {*addqi_2} (nil)) rh821223.i:21:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:767 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The problem is that addqi_1 pattern before the peephole2 in some alternatives allows "r" registers rather than "q" and emits addl instead of addq in that case, and the peepholes I've added for 4.7+ didn't think about such a possibility. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org @ 2012-05-15 10:14 ` jakub at gcc dot gnu.org 2012-05-15 10:20 ` jakub at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 10:14 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2012-05-15 Target Milestone|--- |4.7.1 Ever Confirmed|0 |1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org 2012-05-15 10:14 ` [Bug target/53358] " jakub at gcc dot gnu.org @ 2012-05-15 10:20 ` jakub at gcc dot gnu.org 2012-05-15 15:21 ` jakub at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 10:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-15 10:13:52 UTC --- Created attachment 27409 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27409 gcc47-pr53358.patch Untested fix. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org 2012-05-15 10:14 ` [Bug target/53358] " jakub at gcc dot gnu.org 2012-05-15 10:20 ` jakub at gcc dot gnu.org @ 2012-05-15 15:21 ` jakub at gcc dot gnu.org 2012-05-15 15:23 ` jakub at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 15:21 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-15 15:19:22 UTC --- Author: jakub Date: Tue May 15 15:19:10 2012 New Revision: 187544 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187544 Log: PR target/53358 * config/i386/i386.md (*addqi_2 peephole with QImode addition): Check that operands[2] is either immediate, or q_regs_operand. * gcc.dg/pr53358.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr53358.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.md trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org ` (2 preceding siblings ...) 2012-05-15 15:21 ` jakub at gcc dot gnu.org @ 2012-05-15 15:23 ` jakub at gcc dot gnu.org 2012-05-15 17:01 ` jakub at gcc dot gnu.org 2012-05-25 8:33 ` jakub at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 15:23 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-15 15:21:47 UTC --- Author: jakub Date: Tue May 15 15:21:38 2012 New Revision: 187545 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187545 Log: PR target/53358 * config/i386/i386.md (*addqi_2 peephole with QImode addition): Check that operands[2] is either immediate, or q_regs_operand. * gcc.dg/pr53358.c: New test. Added: branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr53358.c Modified: branches/gcc-4_7-branch/gcc/ChangeLog branches/gcc-4_7-branch/gcc/config/i386/i386.md branches/gcc-4_7-branch/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org ` (3 preceding siblings ...) 2012-05-15 15:23 ` jakub at gcc dot gnu.org @ 2012-05-15 17:01 ` jakub at gcc dot gnu.org 2012-05-25 8:33 ` jakub at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-15 17:01 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-15 16:49:59 UTC --- Fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/53358] [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org ` (4 preceding siblings ...) 2012-05-15 17:01 ` jakub at gcc dot gnu.org @ 2012-05-25 8:33 ` jakub at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2012-05-25 8:33 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53358 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ncahill_alt at yahoo dot | |com --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-25 07:52:01 UTC --- *** Bug 53482 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-25 7:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-05-15 9:57 [Bug target/53358] New: [4.7/4.8 Regression] ICE due to TARGET_READ_MODIFY_WRITE peephole2 jakub at gcc dot gnu.org 2012-05-15 10:14 ` [Bug target/53358] " jakub at gcc dot gnu.org 2012-05-15 10:20 ` jakub at gcc dot gnu.org 2012-05-15 15:21 ` jakub at gcc dot gnu.org 2012-05-15 15:23 ` jakub at gcc dot gnu.org 2012-05-15 17:01 ` jakub at gcc dot gnu.org 2012-05-25 8:33 ` jakub 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).