]> granicus.if.org Git - llvm/commit
[InstSimplify] add tests for possible sdiv/srem simplifications; NFC
authorSanjay Patel <spatel@rotateright.com>
Mon, 11 Sep 2017 19:42:41 +0000 (19:42 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 11 Sep 2017 19:42:41 +0000 (19:42 +0000)
commitc18e8bc0df80e4ec1660a9f44ac766426733d972
tree28c5c52f33c2a2159ab69d7dad3577d9379820b3
parente4e1eed1d79d2123d74bcbcb750bc47679b939f1
[InstSimplify] add tests for possible sdiv/srem simplifications; NFC

As noted in PR34517, the handling of signed div/rem is not on par with
unsigned div/rem. Signed is harder to reason about, but it should be
possible to handle at least some of these using the same technique that
we use for unsigned: use icmp logic to see if there's a relationship
between the quotient and divisor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312938 91177308-0d34-0410-b5e6-96231b3b80d8
test/Transforms/InstSimplify/signed-div-rem.ll [new file with mode: 0644]