/* { dg-do compile } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=cell -mminimal-toc" { target { powerpc*-*-* && lp64 } } } */ struct A { char *a; unsigned int b : 1; unsigned int c : 31; }; struct B { struct A *d; }; void foo (struct B *x, unsigned long y) { if (x->d[y].c) return; if (x->d[y].b) x->d[y].a = 0; } ICEs with -m64 -O2 -mtune=cell -mminimal-toc, as elimination offsets change.
Subject: Re: New: [4.4 Regression] gcc_assert (verify_initial_elim_offsets ()); ICE This is mostly likely due to my no micro code patch. I see what causes it tommorow. Sent from my iPhone On Feb 17, 2009, at 11:55 PM, "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org > wrote: > /* { dg-do compile } */ > /* { dg-options "-O2" } */ > /* { dg-options "-O2 -mtune=cell -mminimal-toc" { target { powerpc*- > *-* && lp64 > } } } */ > > struct A > { > char *a; > unsigned int b : 1; > unsigned int c : 31; > }; > > struct B > { > struct A *d; > }; > > void > foo (struct B *x, unsigned long y) > { > if (x->d[y].c) > return; > if (x->d[y].b) > x->d[y].a = 0; > } > > ICEs with -m64 -O2 -mtune=cell -mminimal-toc, as elimination offsets > change. > > > -- > Summary: [4.4 Regression] gcc_assert > (verify_initial_elim_offsets > ()); ICE > Product: gcc > Version: 4.4.0 > Status: UNCONFIRMED > Keywords: ice-on-valid-code > Severity: normal > Priority: P3 > Component: target > AssignedTo: unassigned at gcc dot gnu dot org > ReportedBy: jakub at gcc dot gnu dot org > GCC target triplet: powerpc64-linux > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39226 >
Yeah. Unlike anddi3_internal3_mc insn, anddi3_internal3_nomc only has an alternative with "t" for the and64_2_operand that is not slightly disparaged (?s), so for masks that match mask_operand or mask64_operand reload decides to reload the DImode constant into register, which needs to be put into memory and needs a TOC register etc.
Hmm, for the PS3 toolchain, I think I just removed anddi3_internal3_mc. Mine.
You mean anddi3_internal3_nomc, right? If so, I guess anddi3_internal2_nomc should be removed too.
(In reply to comment #4) > You mean anddi3_internal3_nomc, right? If so, I guess anddi3_internal2_nomc > should be removed too. I will have to look at what I did, I know I ran into a case where a constant was being generated but really does not need to be generated ...
http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00148.html patch posted.
Subject: Bug 39226 Author: jakub Date: Wed Apr 1 16:18:46 2009 New Revision: 145411 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145411 Log: PR target/39226 * config/rs6000/rs6000.md (andsi3_internal5_nomc, anddi3_internal2_nomc, anddi3_internal3_nomc): Removed. (booldi3_internal3): Use boolean_or_operator instead of boolean_operator. * gcc.dg/pr39226.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr39226.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
Subject: Bug 39226 Author: jakub Date: Wed Apr 1 16:22:17 2009 New Revision: 145412 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145412 Log: PR target/39226 * config/rs6000/rs6000.md (andsi3_internal5_nomc, anddi3_internal2_nomc, anddi3_internal3_nomc): Removed. (booldi3_internal3): Use boolean_or_operator instead of boolean_operator. * gcc.dg/pr39226.c: New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr39226.c - copied unchanged from r145411, trunk/gcc/testsuite/gcc.dg/pr39226.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/config/rs6000/rs6000.md branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
Fixed.
So closing.