[InstCombine] Omit 'urem' where possible
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 1 Jul 2019 09:41:43 +0000 (09:41 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 1 Jul 2019 09:41:43 +0000 (09:41 +0000)
commitf55818e3a7207e670193e16b75efe1db093b5872
treead3027dbdf4ed2a122bceec0e6542c70183232be
parent0f82f64c8326ae50667f0a3c7552ca4f3e81f782
[InstCombine] Omit 'urem' where possible

This was added in D63390 / rL364286 to backend,
but it makes sense to also handle it in middle-end.
https://rise4fun.com/Alive/Zsln

llvm-svn: 364738
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/omit-urem-of-power-of-two-or-zero-when-comparing-with-zero.ll