[LLVMdev] how to turn off conversion of add's into or's (in address calculations)

Jingyue Wu jingyue at google.com
Fri Jun 6 09:38:12 PDT 2014


HI Helkki,

I guess instcombine does that. See InstCombineAddSub.cpp:1107. The
optimization there is more general than converting address computation
adds. If A and B don't have common bits, instcombine converts A + B to A |
B. I am not aware of any configuration to turn this particular optimization
off. If you just want to experiment, you can always change the code. Or you
can improve your analysis/optimization to treat such OR as ADD.

Ignore if you already know this: you can run "opt -O3 -print-after-all" to
figure out which optimization pass does a certain thing.

Jingyue


On Fri, Jun 6, 2014 at 6:11 AM, Heikki Kultala <hkultala at cs.tut.fi> wrote:

> It seems some optimization pass converts some address computation add's
> into or's when it knows it's allowed due correct alignment.
>
> How do I turn this off keep the address calculations as adds?
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140606/276f4de9/attachment.html>


More information about the llvm-dev mailing list