[llvm] r258296 - [SelectionDAG] Fold more offsets into GlobalAddresses

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 20 15:22:41 PST 2016


Hi Tobias,

Thanks for the report! I've now submitted r258366 with a fix.

Dan

On Wed, Jan 20, 2016 at 12:13 PM, Tobias Grosser <tobias at grosser.es> wrote:

> On 01/20/2016 08:03 AM, Dan Gohman via llvm-commits wrote:
>
>> Author: djg
>> Date: Wed Jan 20 01:03:08 2016
>> New Revision: 258296
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=258296&view=rev
>> Log:
>> [SelectionDAG] Fold more offsets into GlobalAddresses
>>
>> SelectionDAG previously missed opportunities to fold constants into
>> GlobalAddresses in several areas. For example, given `(add (add GA, c1),
>> y)`, it
>> would often reassociate to `(add (add GA, y), c1)`, missing the
>> opportunity to
>> create `(add GA+c, y)`. This isn't often visible on targets such as X86
>> which
>> effectively reassociate adds in their complex address-mode folding logic,
>> however it is currently visible on WebAssembly since it currently has very
>> simple address mode folding code that doesn't reassociate anything.
>>
>> This patch fixes this by making SelectionDAG fold offsets into
>> GlobalAddresses
>> at the same times that it folds constants together, so that it doesn't
>> miss any
>> opportunities to perform such folding.
>>
>
> Hi Dan,
>
> I see a miscompile in LNT after this patch:
>
> http://lab.llvm.org:8011/builders/perf-x86_64-penryn-O3/builds/7631
>
> The previous build passes and the other commits seem to be in components
> that are unlikely to even be used.
>
> Best,
> Tobias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160120/32619d12/attachment.html>


More information about the llvm-commits mailing list