craig.topper added a comment. I'm not sure I see anything that ensures C1*C2 doesn't overflow. And in particular if C1*C2 overflows and produces 0, the resulting remainder instruction is UB. Repository: rL LLVM https://reviews.llvm.org/D45976