[CVP] Simplify cmp of local phi node
CVP currently does not simplify cmps with instructions in the same block, because LVI getPredicateAt() currently does not provide much useful information for that case (D69686 would change that, but is stuck.) However, if the instruction is a Phi node, then LVI can compute the result of the predicate by threading it into the predecessor blocks, which allows it simplify some conditions that nothing else can handle. Relevant code: https://github.com/llvm/llvm-project/blob/6d6a4590c5d4c7fc7445d72fe685f966b0a8cafb/llvm/lib/Analysis/LazyValueInfo.cpp#L1904-L1927 Differential Revision: https://reviews.llvm.org/D72169
Loading
Please sign in to comment