On Tue, Dec 01, 2015 at 09:39:30PM -0600, Segher Boessenkool wrote:
> On Wed, Dec 02, 2015 at 01:50:46PM +1030, Alan Modra wrote:
> > On Wed, Dec 02, 2015 at 01:55:17AM +, Segher Boessenkool wrote:
> > > + emit_insn (gen_subdi3 (tmp, op1, op2));
> > > + emit_insn (gen_lshrdi3 (tmp2, tmp, GEN_
On Wed, Dec 02, 2015 at 01:50:46PM +1030, Alan Modra wrote:
> On Wed, Dec 02, 2015 at 01:55:17AM +, Segher Boessenkool wrote:
> > + emit_insn (gen_subdi3 (tmp, op1, op2));
> > + emit_insn (gen_lshrdi3 (tmp2, tmp, GEN_INT (63)));
> > + emit_insn (gen_anddi3 (tmp3, tmp2, const1_rtx));
>
> Why
On Wed, Dec 02, 2015 at 01:55:17AM +, Segher Boessenkool wrote:
> + emit_insn (gen_subdi3 (tmp, op1, op2));
> + emit_insn (gen_lshrdi3 (tmp2, tmp, GEN_INT (63)));
> + emit_insn (gen_anddi3 (tmp3, tmp2, const1_rtx));
Why the AND? The top 63 bits are already clear.
--
Alan Modra
Australia
On Tue, Dec 1, 2015 at 8:55 PM, Segher Boessenkool
wrote:
> On 64-bit we can do comparisons of 32-bit values by extending those
> values to 64-bit, subtracting them, and then getting the high bit of
> the result. For registers this is always cheaper than using the carry
> bit sequence; and if the
On 64-bit we can do comparisons of 32-bit values by extending those
values to 64-bit, subtracting them, and then getting the high bit of
the result. For registers this is always cheaper than using the carry
bit sequence; and if the comparison involves a constant, this is cheaper
than the sequence