This is the mail archive of the 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: [RFC] type promotion pass

On Tue, 2017-09-19 at 11:13 +1000, Kugan Vivekanandarajah wrote:

> >
> I tried the testases you have in the patch with type promotion. Looks
> like forwprop is reversing the promotion there. I haven't looked in
> detail yet but -fno-tree-forwprop seems to remove 6 "and" from the
> test case. I have a slightly different version to what Prathamseh has
> posted and hope that there isn't any difference here.
> Thanks,
> Kugan

I don't think there is any way the type promotion pass can help with
the test case I have for pr77729. The 'and' operations go away in
forwprop but there are still type conversions like 'unsigned_int_var =
(unsigned int) char_var' and that is going to generate an 'and'
instruction (or an extend instruction) in RTL unless we know that
char_var is stored in a register whose upper bits have already been
zeroed out somehow.  In my test case the only way to know that is to
know that the load byte instruction zeroed them out.

Steve Ellcey

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