<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 22, 2016 at 7:11 PM, Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 12/22/2016 5:45 PM, Phil Tomson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Given that this is compiled with -O0, would there a way to skip the Optimization of the Type-legalized selection DAG? It's fine until it optimizes the Type-legalized selection DAG into the Optimized Type-legalized selection DAG.<br>
</blockquote>
<br></span>
Umm, I wouldn't really suggest shoving the problem under the rug... I mean, turning off the optimization might make this particular testcase work the way you want it to, but the problem will still be lurking, waiting to be triggered by a different configuration.<br></blockquote><div><br></div><div>Possibly, but this testcase is based on distilling some larger libraries which we found to be failing into this testcase. And we need to move forward with being able to compile those larger libraries correctly by year end (they need them with -O0 -g ie. a debug build otherwise I'd tell them to just compile with -O2 which works). <br><br>Since this is happening after the Type-legalized selection DAG is optimized and prior to Instruction Selection I'm thinking this is an upstream LLVM bug and thus won't be fixed in time for us to get done what we need to get done. Of course I could be wrong about this assessment, how might this be a target-specific bug?<br><br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There are patches floating around to turn off DAGCombine, and various parts of it, at -O0; you should be able to find past email threads on llvmdev discussing it. IIRC it causes problems for various targets because it exercises different codepaths.</blockquote><div><br></div><div>I suspect this is probably the best short-term solution to turn off DAGCombine if -O0 is specified.<br><br></div><div>Phil <br></div><div><br></div><div>Is this <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</div></div></blockquote></div><br></div></div>