[PATCH] D25200: [InstCombine] New opportunities for FoldAndOfICmp and FoldXorOfICmp

Ehsan Amiri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 11:10:03 PST 2016


amehsan added a comment.

In https://reviews.llvm.org/D25200#610628, @spatel wrote:

> In https://reviews.llvm.org/D25200#610626, @spatel wrote:
>
> > Can you just assert that the predicate is not 'ugt' in isAnyBitSet() and simplify that a bit more? Ie, we don't need a switch if we know that eq/ne are the only predicate possibilities for this transform.
>
>
> "assert" is probably too strong...I've made that mistake before. :)
>  But I think it's still safe to ignore the 'ugt' case and assume that InstCombine will churn that away sooner or later.


You are right (I just tried it :-) If that is the only concern is it possible to approve this and I will remove that line from the switch stmt. (I think it does not hurt to leave the testcases though) and commit. Of course


https://reviews.llvm.org/D25200





More information about the llvm-commits mailing list