[InstCombine] Simplify `icmp pred (sdiv exact X, C), (sdiv exact Y, C)` into...
[InstCombine] Simplify `icmp pred (sdiv exact X, C), (sdiv exact Y, C)` into `icmp pred X, Y` when C is positive (#76409) Alive2: https://alive2.llvm.org/ce/z/u49dQ9 It will improve the codegen of `std::_Vector_base<T>::~_Vector_base()` when `sizeof(T)` is not a power of 2. NOTE: We can also fold `icmp signed-pred (sdiv exact X, C), (sdiv exact Y, C)` into `icmp signed-pred (sdiv exact Y, C), (sdiv exact X, C)` when C is negative. But I don't think it enables more optimizations for real-world applications.
parent
7962bd57
Please register or sign in to comment