<div dir="ltr">Cool, that all made sense. Thanks for the help and the useful code examples. Cleared things up.<div><br></div><div>-Dilan</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 7, 2017 at 2:32 PM Friedman, Eli <<a href="mailto:efriedma@codeaurora.org">efriedma@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7/7/2017 1:34 PM, Dilan Manatunga wrote:<br>
> Ohh, that makes sense. And is the reason the first instruction doesn't<br>
> get deleted because the ExpandPseudoInstructions pass occurs after<br>
> Register Allocation and machine dead code elimination?<br>
<br>
That's how it works right now, yes, but it's a bug, not the intended<br>
design.  (Post-RA scheduling runs after ExpandPseudoInstructions, so we<br>
need accurate dependencies; I'm surprised we haven't seen any miscompiles.)<br>
<br>
The correct way to represent the dependency is with an implicit use.<br>
See UpdatePredRedefs in IfConversion.cpp for an example.<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>
</blockquote></div>