On Wed, 17 Aug 2011, Paolo Carlini wrote:

> Hi,
> 
> I prepared the below basing on an hint provided by Joseph on the audit trail:
> essentially, I'm replacing all (but two) uses of abs_hwi outside hwint.c by
> absu_hwi, a variant which returns an unsigned HOST_WIDE_INT. All the
> replacements make sense to me: either we are comparing two abs, or we are
> passing the abs to a function actually expecting an unsigned HOST_WIDE_INT, or
> we are comparing to another unsigned HOST_WIDE_INT, or we are just comparing
> to a constant (I don't feel strongly in this case but seems safe to use
> absu_hwi here too). I'm *not* replacing 2 occurrences in
> gimple_expand_builtin_pow, because those are safe anyway in terms of range of
> the argument (it's an HOST_WIDE_INT / 2 or 3) and the result is passed to a
> function expecting a plain HOST_WIDE_INT (ie, gimple_expand_builtin_powi).
> 
> I sanity checked the patch on x86_64-linux and OP reported that on AVR the
> patch fixes the regression.
> 
> Is it ok?

Ok.  It looks like we might want to elimiate abs_hwi alltogether
in favor of absu_hwi?

Thanks,
Richard.

Reply via email to