<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 28/06/13 15:56, Eli Friedman wrote:<br>
</div>
<blockquote
cite="mid:CAJdarcH25W6a8_JRfC96APjKMjeiu8buff4qw-DQmt0jHzSHjw@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div dir="ltr">On Fri, Jun 28, 2013 at 6:13 AM, Richard Osborne <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:richard@xmos.com" target="_blank">richard@xmos.com</a>></span>
wrote:<br>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">If I
give instcombine the following IR:<br>
<br>
define i1 @f([1 x i8]* %a, [1 x i8]* %b) {<br>
%c = getelementptr [1 x i8]* %a, i32 0, i32 0<br>
%d = getelementptr [1 x i8]* %b, i32 0, i32 0<br>
%cmp = icmp ult i8* %c, %d<br>
ret i1 %cmp<br>
}<br>
<br>
It optimizes it into:<br>
<br>
define i1 @f([1 x i8]* %a, [1 x i8]* %b) {<br>
%cmp = icmp slt [1 x i8]* %a, %b<br>
ret i1 %cmp<br>
}<br>
<br>
Is this a bug, or are there some semantics of icmp or
getelementptr I'm missing that mean it's OK to change this
from an unsigned comparison to a signed comparison?<span
class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote>
<div> <br>
</div>
<div>Looks like a bug to me.<br>
<br>
</div>
<div>-Eli<br>
</div>
</div>
</div>
</div>
</blockquote>
Thanks for confirming this, I've filed it as PR16483:<br>
<br>
<a class="moz-txt-link-freetext" href="http://llvm.org/PR16483">http://llvm.org/PR16483</a><br>
<br>
<pre class="moz-signature" cols="72">--
Richard Osborne | XMOS
<a class="moz-txt-link-freetext" href="http://www.xmos.com">http://www.xmos.com</a>
</pre>
</body>
</html>