<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 06/06/2014 09:38 AM, Jingyue Wu
wrote:<br>
</div>
<blockquote
cite="mid:CAMROOrFTt69GsBj=9hSKXRE10Y2Pf=haaFpDiGCnxEwTocnRvA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">
<div>HI Helkki, </div>
<div><br>
</div>
<div>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. <br>
</div>
<div><br>
</div>
<div>Ignore if you already know this: you can run "opt -O3
-print-after-all" to figure out which optimization pass does a
certain thing. </div>
<div><br>
</div>
<div>Jingyue</div>
</div>
</blockquote>
Add the IR level, most / nearly all address calculations are hidden
in GEPs. They are only really exposed later in SelectionDAG, so
DAGCombiner is probably doing this<br>
<br>
<blockquote
cite="mid:CAMROOrFTt69GsBj=9hSKXRE10Y2Pf=haaFpDiGCnxEwTocnRvA@mail.gmail.com"
type="cite">
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Fri, Jun 6, 2014 at 6:11 AM, Heikki
Kultala <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:hkultala@cs.tut.fi" target="_blank">hkultala@cs.tut.fi</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems some optimization pass converts some address
computation add's into or's when it knows it's allowed due
correct alignment.<br>
<br>
How do I turn this off keep the address calculations as
adds?<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true" href="mailto:LLVMdev@cs.uiuc.edu"
target="_blank">LLVMdev@cs.uiuc.edu</a> <a
moz-do-not-send="true" href="http://llvm.cs.uiuc.edu"
target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a moz-do-not-send="true"
href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev"
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</body>
</html>