<div dir="ltr"><div>Nothing in LLVM today creates a MachineInstr that has JCC_2 or JCC_4 opcode. Those only get created by assembler relaxation after everything has been converted to MCInst. Do you have your own code that is creating JCC_2/JCC_4?</div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 11, 2019 at 9:47 AM S. Bharadwaj Yadavalli <<a href="mailto:bharadwajy@gmail.com">bharadwajy@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I notice that the following recent addition<br>
<br>
X86::CondCode X86::getCondFromBranch(const MachineInstr &MI) {<br>
switch (MI.getOpcode()) {<br>
default: return X86::COND_INVALID;<br>
case X86::JCC_1:<br>
return static_cast<X86::CondCode>(<br>
MI.getOperand(MI.getDesc().getNumOperands() - 1).getImm());<br>
}<br>
}<br>
<br>
returns an invalid condition for JCC_2 and JCC_4 conditional opcodes.<br>
<br>
What is the suggested way to figure out the condition code for JCC_2 and JCC_4?<br>
<br>
Should I just roll one up for myself to handle such opcodes based on<br>
the above? Am I missing something conceptually?<br>
<br>
Thanks,<br>
<br>
Bharadwaj<br>
</blockquote></div>