<div dir="ltr">Thanks, James.<div>This answers my question. I will have to retrieve other operations that use the same value. But even this won't work in all case.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 18, 2017 at 7:28 AM, James Courtier-Dutton <span dir="ltr"><<a href="mailto:james.dutton@gmail.com" target="_blank">james.dutton@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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><span class="HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">James</div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 17 Nov 2017 21:12, "Dounia Khaldi via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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></div></div><span class="">______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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></span></blockquote></div></div>
</blockquote></div><br></div>