<div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I am writing a decompiler. For this, i need to do type inference propagation. EQ/NEQ do not provide any indication of type. So the only solution is to infer it from other uses of the same registers.</div><div dir="auto">I think you will have to do the same. </div><div dir="auto">Also, there are problem edge cases. What if one register is signed and the other is unsigned?</div><div dir="auto"><br></div><div dir="auto">Kind regards</div><div dir="auto"><br></div><div dir="auto">James</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 Nov 2017 21:12, "Dounia Khaldi via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>In one of the loop transformations I am  developing, I need to convert eq and neq loop latch condition into less than or greater
than depending on the control flow.</div><div><p class="MsoNormal"><span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">The problem is that  CmpInst::ICMP_EQ and
CmpInst::ICMP_NE are neither signed nor unsigned in LLVM. Also, I did not find a way
to find out if the integer operands of the CmpInst are signed
or unsigned. Apparently, LLVM does not distinguish in its type system between signed and
unsigned variables. So, I am not able to generate the appropriate signed or
unsigned ICMP_(S|U)LT or ICMP_(S|U)GT. <span></span></p><p class="MsoNormal"><br></p><p class="MsoNormal">Do you have a solution for this?</p><p class="MsoNormal"><br></p><p class="MsoNormal">Thanks,</p><p class="MsoNormal">Dounia</p></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div></div>