<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Feb 8, 2015 at 8:38 AM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Currently, we might replace:<br>
  %cmp = icmp sgt i32 undef, INT_MAX -> i1 false<br>
<br>
According to this proposal, we could replace:<br>
 %cmp = icmp sgt i32 undef, INT_MAX -> i1 undef<br>
<br>
While replacing it with false is still allowed, so is replacing it with true. I'm not sure this makes sense.</blockquote><div><br></div><div>I think your example is a compelling argument for making icmp more powerful and less obvious when you replace INT_MAX with an unknown variable %a:<br></div><div>%cmp = icmp sgt i32 undef, %a</div><div><br></div><div>We'd like to make %cmp undef without having to prove that %a is not INT_MAX. I'm pretty sure instcombine does something like this today, and this change would provide the basis for it.</div></div></div></div>