11 Commits

Author SHA1 Message Date
Gabor Buella
0aae914817 NFC - Various typo fixes in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336268 91177308-0d34-0410-b5e6-96231b3b80d8
2018-07-04 13:28:39 +00:00
Tim Northover
4d3b212098 ARM: convert ORR instructions to ADD where possible on Thumb.
Thumb has more 16-bit encoding space dedicated to ADD than ORR, allowing both a
3-address encoding and a wider range of immediates. So, particularly when
optimizing for code size (but it doesn't make things worse elsewhere) it's
beneficial to select an OR operation to an ADD if we know overflow won't occur.

This is made even better by LLVM's penchant for putting operations in canonical
form by converting the other way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335119 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-20 12:09:44 +00:00
Sam Parker
3757f28f1d [DAGCombine] Improve ReduceLoad for SRL
Recommitting r329283, third time lucky...

If the SRL node is only used by an AND, we may be able to set the
ExtVT to the width of the mask, making the AND redundant. To support
this, another check has been added in isLegalNarrowLoad which queries
whether the load is valid.

Differential Revision: https://reviews.llvm.org/D41350


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329551 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-09 08:16:11 +00:00
Sam Parker
b326c6e97a [DAGCombine] Revert r329160
Again, broke the big endian stage 2 builders.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329283 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-05 13:46:17 +00:00
Sam Parker
9b4235c03c [DAGCombine] Improve ReduceLoadWidth for SRL
Recommitting rL321259. Previosuly this caused an issue with PPCBE but
I didn't receieve a reproducer and didn't have the time to follow up.
If the issue appears again, please provide a reproducer so I can fix
it.

Original commit message:

If the SRL node is only used by an AND, we may be able to set the
ExtVT to the width of the mask, making the AND redundant. To support
this, another check has been added in isLegalNarrowLoad which queries
whether the load is valid.

Differential Revision: https://reviews.llvm.org/D41350


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329160 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-04 09:26:56 +00:00
Sam Parker
6a32f89109 [DAGCombine] Revert r321259
Improve ReduceLoadWidth for SRL Patch is causing an issue on the
PPC64 BE santizer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22 08:36:25 +00:00
Sam Parker
153f2e3851 [DAGCombine] Improve ReduceLoadWidth for SRL
If the SRL node is only used by an AND, we may be able to set the
ExtVT to the width of the mask, making the AND redundant. To support
this, another check has been added in isLegalNarrowLoad which queries
whether the load is valid.

Differential Revision: https://reviews.llvm.org/D41350


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321259 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-21 12:55:04 +00:00
Sam Parker
2e83f99d56 [ARM] Adjust test checks
Correct the CHECK-LABELS of a couple of dag combine tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 10:08:03 +00:00
Sam Parker
213645abbd [ARM] Some DAG combine tests
Add some more and and shift load combine tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-15 15:30:39 +00:00
Sam Parker
b1e1f8e9c3 [DAGCombine] Enable more srl -> load combines
Change the calculation for the desired ValueType for non-sign
extending loads, as in those cases we don't care about the
higher bits. This creates a smaller ExtVT and allows for such
combinations as:
(srl (zextload i16, [addr]), 8) -> (zextload i8, [addr + 1])

Differential Revision: https://reviews.llvm.org/D40034


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318390 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16 11:28:26 +00:00
Zijiao Ma
e365f8338a Make the canonicalisation on shifts benifit to more case.
1.Fix pessimized case in FIXME.
2.Add tests for it.
3.The canonicalisation on shifts results in different sequence for
  tests of machine-licm.Correct some check lines.

Differential Revision: https://reviews.llvm.org/D27916

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 02:56:07 +00:00