Recommit "Add optimizations for icmp eq/ne (mul(X, Y), 0)" 2nd Try
First time caused build failure: https://lab.llvm.org/buildbot/#/builders/183/builds/10447 but after investigating it seems to be unrelated. The same test/build passed later with the original commit here: https://lab.llvm.org/buildbot/#/builders/183/builds/10448 1. Add checks if X and/or Y are odd. The Odd values are unnecessary to the icmp: isZero(Odd * N) == isZero(N) 2. If neither X nor Y is known odd, then if X * Y cannot overflow AND if X and/or Y is non-zero, the non-zero values are unnecessary to the icmp. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D140850
Loading
Please sign in to comment