This is the mail archive of the gcc-patches@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]

Re: [tree-ssa] More CCP fixes [patch]


On Sun, Aug 11, 2002 at 11:30:58PM +0100, Jason Merrill wrote:
> Shouldn't the optimizer just be able to see that x.u was initialized to -1,
> and not care about its size?

For the record, since I discussed this today with Diego in IRC, it
is my opinion that this mistake happens because of how we mis-represent
bit fields in the front end at present.

Eg x.u is given a type that is a 32-bit unsigned integer, which
gets cast to a 32-bit signed integer, at which point we don't
realize that a zero extension is required.

Neil's bit field patches should fix this by properly representing
x.u as a 3-bit unsigned integer.


r~


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