[LLVMdev] Fwd: folding x * 0 = 0

Chris Lattner clattner at apple.com
Wed Mar 3 23:56:19 PST 2010


On Mar 3, 2010, at 11:52 PM, Paul Davey wrote:

> sorry forgot to change address :/
> Rob:
> 
> from original post:
> 
> I would expect the following optimizations, but didn't find them in the
> code:
> x  + 0 = x
> x * 0 = 0
> x * 1 = 1
> x * -1 = -x

Take a look at lib/Analysis/InstructionSimplify.cpp

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100303/c9089edd/attachment.html>


More information about the llvm-dev mailing list