On 09 April 2007 22:12, Richard Henderson wrote: > On Mon, Apr 09, 2007 at 07:37:31PM +0100, Dave Korn wrote: >> Should promotion of function arguments be explicitly represented in >> GIMPLE, or should it be performed when generating the corresponding RTL? > > There are two things here: > > (1) Promotion of arguments to their devlared types, should > be at the tree level. > > (2) Promotion of arguments to wider types, as specified by > the abi, should be done when generating rtl. > > The problem you're tracking is in (1). > > > r~
Thanks, I think you're right on there. The comments on PR31136 make it fairly clear what's wrong; perhaps the best solution might be for STRIP_SIGN_NOPS to mask out the high bits when it's discarding a size-reducing NOP_EXPR? Or perhaps fold_unary should simplify it before passing to STRIP_SIGN_NOPS for minimal peturbation? cheers, DaveK -- Can't think of a witty .sigline today....