<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I checked the debug log: this is what’s happening.<div class=""><br class=""></div><div class="">1. Because f16 isn’t legal, SINT_TO_FP and FP_TO_SINT get promoted to f32.</div><div class="">2. f32 has 24 mantissa bits, which is enough to losslessly represent i16s. So the conversion gets eliminated in <span style="font-family: Menlo; font-size: 11px;" class="">FoldIntToFPToInt.</span></div><div class=""><br class=""></div><div class="">Part 1) here looks fairly suspicious.</div><div class=""><br class=""></div><div class="">—escha</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 4, 2016, at 5:41 PM, John Criswell via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<div class="moz-cite-prefix">On 5/4/16 8:25 PM, Carlos Liam via
llvm-dev wrote:<br class="">
</div>
<blockquote cite="mid:0BD977EC-783A-4CE5-847A-03D6790649CA@aarzee.me" type="cite" class="">
<meta http-equiv="Context-Type" content="text/html;
charset=us-ascii" class="">
I have IR at <a moz-do-not-send="true" href="https://ghostbin.com/paste/daxv5" class="">https://ghostbin.com/paste/daxv5</a> which
is meant to exit 1, but it is always exiting 0.
<div class=""><br class="">
</div>
</blockquote>
<br class="">
1) It would help if you pasted the relevant code into your message.
Paranoid people like me don't following links in emails.<br class="">
<br class="">
2) Have you ensured that your program doesn't exercise undefined
behavior? If your program has a signed overflow, an out-of-bounds
error, or some other undefined behavior, the compiler may optimize
it in surprising and unexpected way.<br class="">
<br class="">
Regards,<br class="">
<br class="">
John Criswell<br class="">
<br class="">
<blockquote cite="mid:0BD977EC-783A-4CE5-847A-03D6790649CA@aarzee.me" type="cite" class="">
<div class="">I'm using it as a template for checking if two
functions @test1 and @test2 are equivalent by checking against
the exhaustive possible i16 values. For this particular example
it should be enough to know that for certain i16, @test1 and
@test2 are *not* equal. When an inequality is found, the program
should exit 1. However, it seems like it's always exiting 0. Is
there something I'm doing wrong?<br class="">
<div class="">
<br class="Apple-interchange-newline">
<span class=""> - CL</span>
</div>
<br class="">
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<pre wrap="" class="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br class="">
<br class="">
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>