[LLVMdev] Instruction combiner: converting arithmetic into bit operations

Chris Lattner clattner at apple.com
Wed Oct 17 10:39:38 PDT 2012


On Oct 17, 2012, at 10:36 AM, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:

> On 10/17/2012 11:57 AM, Chris Lattner wrote:
>> 
>> We do want one canonical form, but it would be an interesting experiment to see what happens when we turned 'or' into 'add' instead of the other way around.  We'd have to make sure that simplifydemandedbits and friend can handle the add case as well as the or case, but I think it is already close to smart enough to do that.
> 
> I looked in Reassociate.cpp and I saw that it internally converts shifts into multiplications.  I think it would be worthwhile to at least investigate this possibility further.

Sure, go for it!

-Chris



More information about the llvm-dev mailing list