[InstCombine] fold exact sdiv to ashr
sdiv exact X, (1<<ShAmt) --> ashr exact X, ShAmt (if shl is non-negative) https://alive2.llvm.org/ce/z/kB6VF7 It would probably be better to use ValueTracking to replace this and the existing transform above it, but the analysis does not account for the no-wrap properly, and it's not immediately clear to me how to fix it.
parent
e17ec8e9
Please register or sign in to comment