[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)
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 15:51:29 PDT 2017
reames added a comment.
Ok, I finally got a chance to look at this, sorry for the long delay.
I see the problem you're trying to solve, but I think this patch goes about it the wrong way. I don't think you need any special handling per se, this is a case that JumpThreading::ComputeValueKnownInPredeccessors should handle for you. We should be able to figure out that the %0 icmp expression is known the be false if the "if.then, if.end" edge is executed. In fact, the handling for recursion on icmps and binary operators appears to already be there, so I'm not quite sure why it's not working today. I think this likely comes down to some small bug in either CVKInP or in the jump-threading logic itself.
https://reviews.llvm.org/D33262
More information about the llvm-commits
mailing list