]> granicus.if.org Git - llvm/commit
[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)
commit34c16ce0f77613209bed6ed986adcf6252151640
tree126fd01a1aec408478de580fb4905b5e03738a33
parente809ebbdddc5d44f8c8d39d029f9fe0fc1d73800
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367046 91177308-0d34-0410-b5e6-96231b3b80d8
test/Transforms/DivRemPairs/PowerPC/div-expanded-rem-pair.ll [new file with mode: 0644]
test/Transforms/DivRemPairs/X86/div-expanded-rem-pair.ll [new file with mode: 0644]