<div dir="ltr">My bad for not looking further. I'm still somewhat confused though. MOVCCr gets expanded in the ARMExpandPseudoInsts pass, and it still seems only a case of one instruction replacing the other.<div><br></div><div>My worry of emitting two instructions, is that a dead code pass will eliminate the first instruction cause it thinks the second instruction is defining the same register.</div><div><br></div><div>-Dilan</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 7, 2017 at 11:20 AM 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 11:12 AM, Dilan Manatunga via llvm-dev wrote:<br>
> Hi,<br>
><br>
> I was wondering what would be the best way to lower a select operation<br>
> two predicated movs. I looked through the ARM, MIPS, and NVPTX<br>
> backends and they all seem to lower a select to some sort of<br>
> conditional move or native select operation.<br>
<br>
ARM lowers a select to a predicated mov.  MOVCCr is a pseudo-instruction<br>
which gets expanded after instruction selection.<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>