This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/35518] [4.4 Regression] FAIL: gcc.c-torture/execute/20040709-1.c execution at -O2 and above



------- Comment #22 from aoliva at gcc dot gnu dot org  2008-06-25 20:20 -------
Sorry that it took me so long to look at this.

Richi, I have a feeling that your patch will just paper over the problem.

See, if we take a bit-range that's not the entire bit-field, it will emit the
same shifts, and it will break in the same way.

The problem is that there's a disconnect between the width of the underlying
mode/type and the width of the variable in which it is held.

When I introduced bit-fields in SRA, one of my goals was to introduce scalars
for "remaining" fields (i.e., those that didn't get scalar versions of their
own) in such a way that no extraneous shifting was needed: we'd just extract
the bits without shifting them around, for this would be just wasted
computation.  It sufficed to apply masks to recombine these remaining fields
into their proper place.

Now, when you changed type from a mode-sized type to a nonstandard
bitfield-sized type and replaced some bitfield references with plain
conversions, you broke this property and removed the fix-ups that would have
taken care of ensuring the shifts (if any) matched.

At least that's my impression from looking at the dumps posted here, your
recent patch to work around the exposed problem and your earlier patch that
introduced it.


-- 

aoliva at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu dot
                   |                            |org
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35518


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]