<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/CodeGen/MSP430, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2019-12-25T00:27:51+00:00</updated>
<entry>
<title>Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351</title>
<updated>2019-12-25T00:27:51+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-12-25T00:11:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a36ddf0aa9db5c1086e04f56b5f077b761712eb5'/>
<id>urn:sha1:a36ddf0aa9db5c1086e04f56b5f077b761712eb5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351</title>
<updated>2019-12-24T23:57:33+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-12-24T23:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=502a77f125f43ffde57af34d3fd1b900248a91cd'/>
<id>urn:sha1:502a77f125f43ffde57af34d3fd1b900248a91cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4)</title>
<updated>2019-11-13T08:23:08+00:00</updated>
<author>
<name>joanlluch</name>
<email>joan.lluch@icloud.com</email>
</author>
<published>2019-11-13T08:23:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d384ad6b636d4a8c55ef53d5316d008a05161b1f'/>
<id>urn:sha1:d384ad6b636d4a8c55ef53d5316d008a05161b1f</id>
<content type='text'>
Summary:
Replaces
```
unsigned getShiftAmountThreshold(EVT VT)
```
by

```
bool shouldAvoidTransformToShift(EVT VT, unsigned amount)
```
thus giving more flexibility for targets to decide whether particular shift amounts must be considered expensive or not.

Updates the MSP430 target with a custom implementation.

This continues  D69116, D69120, D69326 and updates them, so all of them must be committed before this.

Existing tests apply, a few more have been added.

Reviewers: asl, spatel

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70042
</content>
</entry>
<entry>
<title>[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4) (Baseline tests)</title>
<updated>2019-11-11T15:15:33+00:00</updated>
<author>
<name>joanlluch</name>
<email>joan.lluch@icloud.com</email>
</author>
<published>2019-11-11T15:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=abbbf9880c272da7a3db5de40a91dcbddac8bb50'/>
<id>urn:sha1:abbbf9880c272da7a3db5de40a91dcbddac8bb50</id>
<content type='text'>
Summary: Baseline tests before applying D70042

Reviewers: spatel, asl

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70083
</content>
</entry>
<entry>
<title>[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3)</title>
<updated>2019-11-11T09:18:25+00:00</updated>
<author>
<name>joanlluch</name>
<email>joan.lluch@icloud.com</email>
</author>
<published>2019-11-11T09:17:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=e0012c5d6acb568c77c7a6b845637f330e64515f'/>
<id>urn:sha1:e0012c5d6acb568c77c7a6b845637f330e64515f</id>
<content type='text'>
Summary:
Additional filtering of undesired shifts for targets that do not support them efficiently.

Related with  D69116 and  D69120

Applies the TLI.getShiftAmountThreshold hook to prevent undesired generation of shifts for the following IR code:

```
define i16 @testShiftBits(i16 %a) {
entry:
  %and = and i16 %a, -64
  %cmp = icmp eq i16 %and, 64
  %conv = zext i1 %cmp to i16
  ret i16 %conv
}

define i16 @testShiftBits_11(i16 %a) {
entry:
  %cmp = icmp ugt i16 %a, 63
  %conv = zext i1 %cmp to i16
  ret i16 %conv
}

define i16 @testShiftBits_12(i16 %a) {
entry:
  %cmp = icmp ult i16 %a, 64
  %conv = zext i1 %cmp to i16
  ret i16 %conv
}
```
The attached diff file shows the piece code in TargetLowering that is responsible for the generation of shifts in relation to the IR above.

Before applying this patch, shifts will be generated to replace non-legal icmp immediates. However, shifts may be undesired if they are even more expensive for the target.

For all my previous patches in this series (cited above) I added test cases for the MSP430 target. However, in this case, the target is not suitable for showing improvements related with this patch, because the MSP430 does not implement "isLegalICmpImmediate". The default implementation returns always true, therefore the patched code in TargetLowering is never reached for that target. Targets implementing both "isLegalICmpImmediate" and "getShiftAmountThreshold" will benefit from this.

The differential effect of this patch can only be shown for the MSP430 by temporarily implementing "isLegalICmpImmediate" to return false for large immediates. This is simulated with the implementation of a command line flag that was incorporated in D69975

This patch belongs to a initiative to "relax" the generation of shifts by LLVM for targets requiring it

Reviewers: spatel, lebedev.ri, asl

Reviewed By: spatel

Subscribers: lenary, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69326
</content>
</entry>
<entry>
<title>[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests)</title>
<updated>2019-11-08T22:16:44+00:00</updated>
<author>
<name>joanlluch</name>
<email>joan.lluch@icloud.com</email>
</author>
<published>2019-11-08T22:16:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=fe0763d28a572f72007637c7bd097bc19cbb58fc'/>
<id>urn:sha1:fe0763d28a572f72007637c7bd097bc19cbb58fc</id>
<content type='text'>
Summary:
This is baseline tests for D69326

Incorporates a command line flag for the MSP430 and adds a test cases to help showing the effects of applying D69326

More details and motivation for this patch in D69326

Reviewers: spatel, asl, lebedev.ri

Reviewed By: spatel, asl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69975
</content>
</entry>
<entry>
<title>[DAGCombine][MSP430] use shift amount threshold in DAGCombine (2/2)</title>
<updated>2019-11-04T18:41:41+00:00</updated>
<author>
<name>Sanjay Patel</name>
<email>spatel@rotateright.com</email>
</author>
<published>2019-11-04T18:41:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=113181e9bd05353ed562ee7b971bf7f1e58cd5de'/>
<id>urn:sha1:113181e9bd05353ed562ee7b971bf7f1e58cd5de</id>
<content type='text'>
Continuation of:
D69116

Contributes to a fix for PR43559:
https://bugs.llvm.org/show_bug.cgi?id=43559

See also D69099 and D69116

Use the TLI hook in DAGCombine.cpp to guard against creating
shift nodes that are not optimal for a target.

Patch by: @joanlluch (Joan LLuch)

Differential Revision: https://reviews.llvm.org/D69120
</content>
</entry>
<entry>
<title>[MSP430] fix typo in test name; NFC</title>
<updated>2019-10-30T18:15:25+00:00</updated>
<author>
<name>Sanjay Patel</name>
<email>spatel@rotateright.com</email>
</author>
<published>2019-10-30T18:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=3e85571432514c7c16a11640a366059d57d8dd0d'/>
<id>urn:sha1:3e85571432514c7c16a11640a366059d57d8dd0d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[MSP430] adjust tests for Shift Amount Threshold; NFC</title>
<updated>2019-10-30T18:12:58+00:00</updated>
<author>
<name>Sanjay Patel</name>
<email>spatel@rotateright.com</email>
</author>
<published>2019-10-30T18:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=67da730da636ec64e93c0ce850d086a78016c9ad'/>
<id>urn:sha1:67da730da636ec64e93c0ce850d086a78016c9ad</id>
<content type='text'>
Baseline results for D69120.

Patch by: @joanlluch (Joan LLuch)
</content>
</entry>
<entry>
<title>[TargetLowering][DAGCombine][MSP430] add/use hook for Shift Amount Threshold (1/2)</title>
<updated>2019-10-19T16:57:02+00:00</updated>
<author>
<name>Sanjay Patel</name>
<email>spatel@rotateright.com</email>
</author>
<published>2019-10-19T16:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a298964d22a203d21bafe1f649a46ba8a2592ca4'/>
<id>urn:sha1:a298964d22a203d21bafe1f649a46ba8a2592ca4</id>
<content type='text'>
Provides a TLI hook to allow targets to relax the emission of shifts, thus enabling
codegen improvements on targets with no multiple shift instructions and cheap selects
or branches.

Contributes to a Fix for PR43559:
https://bugs.llvm.org/show_bug.cgi?id=43559

Patch by: @joanlluch (Joan LLuch)

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

llvm-svn: 375347
</content>
</entry>
</feed>
