[PATCH] D33262: [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4)

Farhana Aleen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 18:38:35 PDT 2017


Farhana added a comment.

It seems to me that the improvement is done in the wrong place which is JumpThreading and made the change-set very specific. In my opinion, it does not have to be specific to JumpThreading. It can be a very general improvement of LVI using your new utilities.

Basically, we can have the following:

- getPredicateOnEdge() does not require a value to be live-in but later functions do.  So, I would think we can easily extend getPredicateOnEdge() to handle any kind of values/Range and do the forward substitution in getPredicateOnEdge() . Basically, the new code you have in JumpThreading that is processing a local value and computing the non-local value can be placed inside  getPredicateOnEdge(). We can also handle all binary operators.

- Then allow any kind of values from ComputeValueKnownInPredecessors() being queried in getPredicateOnEdge()


https://reviews.llvm.org/D33262





More information about the llvm-commits mailing list