[llvm] r303387 - [InstCombine] add more tests for xor-of-icmps; NFC

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 16:25:01 PDT 2017


On Thu, May 18, 2017 at 4:20 PM, Sanjay Patel <spatel at rotateright.com> wrote:
> No, I haven't looked at VRP yet, so I don't know why it's not handled there.
> I was assuming that since InstSimplify/InstCombine already have a large
> chunk of folds for the and/or variants, it would make sense to also handle
> xor there.
>

It depends. I think InstCombine should always try to get the
"easy/cheap" cases (and in general make local decisions) and then
leave more complex transformations to other passes. I think auditing
what's good and what's not to do in InstCombine will be a major
undertaken in LLVM, but at some point we should just bite the bullet
and do it :) (side effect, reduced number of matchers would improve
compile time).

> I have a patch in progress that would handle these cases using the existing
> code (truth tables!). Let me post that for review and see what you think
> about it.
>

Thanks. Feel free to always post mock-ups for review.

--
Davide


More information about the llvm-commits mailing list