]> granicus.if.org Git - llvm/commit
[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)
commit1c1bc8778e6189f073dfe243f68d33d01867203d
treeca95fde9128b2c8e6acd85cc8b612b0c14aa283f
parent624893e969e7fa16e2054c5d0752d6ddc6b1025a
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364738 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/omit-urem-of-power-of-two-or-zero-when-comparing-with-zero.ll