[PATCH] D33862: [x86] avoid flipping sign bits for vector icmp by using known bits
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 4 08:02:04 PDT 2017
spatel added a comment.
In https://reviews.llvm.org/D33862#772368, @RKSimon wrote:
> > Are we better off using pcmpgt + min/max/psubus instructions instead of inverting a pcmp?
>
> TBH, I think the min/max/psubus cases are preferable.
OK - I had an earlier draft that would leave more of those as-is. Let me review that and upload an updated patch.
>> Since we're computing known bits, should we try harder to eliminate other compares like (known negative < known positive)?
>
> There's definitely scope in InstCombine/DAGCombine to use KnownBits to fold more comparisons.
We should certainly try harder in IR, but I wasn't sure if this was a real problem in the DAG. I'll add a TODO comment about this for a follow-up patch.
https://reviews.llvm.org/D33862
More information about the llvm-commits
mailing list