[LLVMdev] RFC: Proposal to Remove Poison
Reid Kleckner
rnk at google.com
Sun Feb 8 09:47:09 PST 2015
On Sun, Feb 8, 2015 at 8:38 AM, Hal Finkel <hfinkel at anl.gov> wrote:
>
> Currently, we might replace:
> %cmp = icmp sgt i32 undef, INT_MAX -> i1 false
>
> According to this proposal, we could replace:
> %cmp = icmp sgt i32 undef, INT_MAX -> i1 undef
>
> While replacing it with false is still allowed, so is replacing it with
> true. I'm not sure this makes sense.
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:
%cmp = icmp sgt i32 undef, %a
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150208/844417cc/attachment.html>
More information about the llvm-dev
mailing list