arsenm added a comment. Could you instead insert a clamp of the divisor and then pattern match that out during selection? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135451/new/ https://reviews.llvm.org/D135451