[llvm-commits] Bug In InstCombine?

Reid Spencer rspencer at reidspencer.com
Mon Mar 5 15:10:20 PST 2007


On Mon, 2007-03-05 at 14:51 -0800, Chris Lattner wrote:

> Interesting case.  the full code looks like this:
> 
>          if (!STO->isNullValue() && !STO->isNullValue()) {
>            uint64_t TVA = STO->getZExtValue(), FVA = SFO->getZExtValue 
> ();
>            if (isPowerOf2_64(TVA) && isPowerOf2_64(FVA)) {
> 
> The isPowerOf2_64 calls check that the argument is not zero.  As  
> such, you can drop the isNullValue checks entirely.

Yup! Even better.

Thanks,

Reid.





More information about the llvm-commits mailing list