[InstCombine] Optimize shl+lshr+and conversion pattern
if `C1` and `C3` are pow2 and `Log2(C3)+C2 < BitWidth`: ((C1 << X) >> C2) & C3 -> X == (Log2(C3)+C2-Log2(C1)) ? C3 : 0; https://alive2.llvm.org/ce/z/Pus5bd Fix issue https://github.com/llvm/llvm-project/issues/55739 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D126617
Loading
Please sign in to comment