[llvm-commits] [PATCH] [llvm] Transform (x&C)>V into (x&C)!=0 wherepossible.

Schoedel, Kevin P kevin.p.schoedel at intel.com
Fri Dec 14 07:53:29 PST 2012


Nuno Lopes [mailto:nunoplopes at sapo.pt] wrote:
> As far as I understand, you're saying that (X & 127) sgt 31 is equivalent to:
> (X & 127) ne 0
> 
> Which is *not* correct. The first expression is, however, equivalent to:
> (X & 96) ne 0

No; using that motivating example from README.txt, the transformation of (x & 127) > 31 into (x & 96) > 31 is already done, by visitICmpInst() calling SimplifyDemandedBits(). This change just adds the remaining step of transforming (x & 96) > 31 into (x & 96) != 0.

-- 
Kevin Schoedel, Software Developer, Intel of Canada
<kevin.p.schoedel at intel.com>      +1 (519) 772-2580







More information about the llvm-commits mailing list