[llvm-commits] PATCH: Simplify comparisons of constant-related pointers, similar to simplifying their difference

Chandler Carruth chandlerc at gmail.com
Sun Mar 25 03:51:33 PDT 2012


I recently taught instsimplify to compute the constant difference of two
pointers which are constant-derived from a common base. This uses the same
logic to handle comparisons. These show up all over the place due to C++
pointers-as-iterators comparing against the end iterator.

I'll add a test case before committing, but it's nothing surprising. Just
wanted to double check the actual code before moving forward.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120325/45cac036/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplify-ptr-cmp.diff
Type: text/x-patch
Size: 1662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120325/45cac036/attachment.bin>


More information about the llvm-commits mailing list