Re: [PATCH 1/2] simplify unsigned compares against 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 23, 2020 at 09:13:22AM -0700, Linus Torvalds wrote:
> On Fri, Oct 23, 2020 at 8:58 AM Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
> >
> > Some unsigned compares against 0 are always true or always false
> > (x < 0 or x >= 0). Simplify them.
> 
> Fair enough, but if you're simplifying compares, one of the more
> important simplifications is to make the compare unsigned in the first
> place.
> 
> ...
> 
> Another comparison simplification often worth doing is to do cast
> simplification, ie
> 
>    ((cast) X cmpop Y)

Yes, these seem quite easy with a nice return rate. I've a lot of
pending, uncompleted topic branches (which I'm currently trying
to polish and upstream, hence the apparent lack of a direction line)
but I don't think I've anything for these. I'll look at them soon. 

-- Luc



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux