[NFC][DivRemPairs] Tests with rem in expanded form (PR42673)
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 25 Jul 2019 20:26:34 +0000 (20:26 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Thu, 25 Jul 2019 20:26:34 +0000 (20:26 +0000)
commitaa205957ff6b977978642544951d133d47294d92
tree5498c84de3fd11c036351e3901243dc3379c9bdc
parent597b3fd3a86816e21160c63fee0627a0e72f9574
[NFC][DivRemPairs] Tests with rem in expanded form (PR42673)

As discussed in https://bugs.llvm.org/show_bug.cgi?id=42673
there is a TTI hook hasDivRemOp() that matters here.
While -div-rem-pairs will decompose 'rem' if that hook returns false,
nothing does the opposite transform.

We can't to this in InstCombine, because it does not currently
access TTI, and i'm not sure we should change that.

We can't really do that in DAGCombine since it also currently does not
access TTI.

Therefore only DivRemPairs is left.

https://bugs.llvm.org/show_bug.cgi?id=42673

llvm-svn: 367046
llvm/test/Transforms/DivRemPairs/PowerPC/div-expanded-rem-pair.ll [new file with mode: 0644]
llvm/test/Transforms/DivRemPairs/X86/div-expanded-rem-pair.ll [new file with mode: 0644]