<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 21, 2013 at 3:15 PM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank" class="cremed">atrick@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><div>On Jan 21, 2013, at 3:12 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank" class="cremed">chandlerc@google.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">On Mon, Jan 21, 2013 at 2:59 PM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank" class="cremed">atrick@apple.com</a>></span> wrote:<br><div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div><div>On Jan 21, 2013, at 12:37 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com" target="_blank" class="cremed">chandlerc@google.com</a>> wrote:</div>

<br><blockquote type="cite"><div dir="ltr">On Mon, Jan 21, 2013 at 11:49 AM, Andrew Trick <span dir="ltr"><<a href="mailto:atrick@apple.com" target="_blank" class="cremed">atrick@apple.com</a>></span> wrote:<br><div class="gmail_extra">

<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Moving to llvmdev...<br>
<div><br>
On Jan 21, 2013, at 11:37 AM, Nadav Rotem <<a href="mailto:nrotem@apple.com" target="_blank" class="cremed">nrotem@apple.com</a>> wrote:<br>
<br>
> Hi Manish,<br>
><br>
> Thank you for looking at this. Recently opt started using the "-mtriple" command line flag to initialize the TargetMachine for IR-level transformations that use it. Currently only the following passes are using this feature: LSR, LowerSwitch, BBVectorizer and LoopVectorizer. If you look at the tests in LoopVectorize you will see that the target-dependent tests are in target-dependent directories.<br>



<br>
</div>The tests in the platform directories are fine. The question is what to do about all the tests in target-independent directories that have "target triple" in the bitcode. These tests don't use -mtriple. Instead, their behavior changes in subtle ways depending on which targets are built. It's certainly a confusing situation.<br>


</blockquote><div><br></div><div>My proposed resolution:</div><div>- If the tests are target independent, delete the triple.<br></div><div>- If they aren't, sink them to a target-specific subdirectory so they're skipped in the absence of the target being built.</div>

</div></div></div></blockquote><div><br></div></div></div><div>Filed <a href="http://llvm.org/pr15025" target="_blank" class="cremed">llvm.org/pr15025</a>.</div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra">

<div class="gmail_quote">
<div>- Make a triple an error if there is not support for that target.</div></div></div></div></blockquote><div><br></div></div>Filed <a href="http://llvm.org/pr15026" target="_blank" class="cremed">llvm.org/pr15026</a>.<blockquote type="cite">


</blockquote></div><div><br></div><div>I assume opt should completely ignore target triple when -mtriple is provided,</div></div></blockquote><div><br></div><div>Yep.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"> potentially bypassing the error.</div></blockquote><div><br></div><div>I would expect opt to error on an invalid '-mtriple' just as it would for an invalid triple in the IR....</div>

</div></div></div>
</blockquote></div><br></div></div><div>Yes, that's what llc does.</div><div><br></div><div>The point is, as long as you specify a valid -mtriple you won't get any warning about a bad IR target triple. Common sense.</div>
</div></blockquote><div><br></div><div style>Oh, of course. Yes. =D </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div>
<div>-Andy</div></div>
</blockquote></div><br></div></div>