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: [patch?] num_sign_bit_copies1: sign_extending consts


Hi DJ,
> This code does not handle sign extension of const_ints very well.
> ...
> The test case is attached also.

Could you provide the target triple this is happening on?  Your test
case works fine at -O2 with mainline CVS for i686-pc-cygwin.

Any unary operation of a constant, or binary operation of two constants
implies something has gone wrong elsewhere in preparing the RTL.  Hence
we need to discover where in GCC is generating the invalid code with an
explicit SIGN_EXTEND rather than calling simplify_gen_unary, which takes
the necessary steps to ensure the RTL is valid.  For example, the
routine simplify_replace_rtx calls this function if a CONST_INT is ever
substituted into an existing SIGN_EXTEND.

Let me know if I can help?

Roger
--


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