This is an archive of the discontinued LLVM Phabricator instance.

Switch scalarize global loads ON by default
ClosedPublic

Authored by alex-t on Jun 20 2017, 9:28 AM.

Details

Summary

This change switches ON scalarization for global loads.
It finalizes series of changes that fix bugs in AMDGPUAnnotateUniformValues and DivergenceAnalysis.

Diff Detail

Event Timeline

alex-t created this revision.Jun 20 2017, 9:28 AM
rampitec edited edge metadata.Jun 20 2017, 9:31 AM

Are there any lit tests affected?

alex-t updated this revision to Diff 104850.Jun 30 2017, 6:01 AM

There are most of the LIT tests affected.
The reason is that most of the AMDGPU tests are initially incorrect.
AMDGPU instruction selection select vector form of the instruction by default.
The reason was related with the SelectionDAG interface restriction. There was no legal way to pass divergence flag into ISel.
That's why any operation that operates on the scalar values is selected to vector form.
Since we're able to select scalar loads for uniform address, most of the tests need to be changed.
In fact there should be separate change that would split tests to vector and scalar parts.
Currently I changed 30 of 140 failed tests and switch scalarizer OFF for the rest of them.
Since SDNode flags was recently changed from byte to short and we have 5 unoccupied bits it become possible to pass divergence to ISel.
I'm going to submit the change that use SDNode flag for divergence information soon.
That's why I switched OFF scalarizer for most of the affected tests. I'm going to change them after we'll have full support for divergence.

rampitec accepted this revision.Jun 30 2017, 11:47 AM
rampitec added a subscriber: llvm-commits.

LGTM

This revision is now accepted and ready to land.Jun 30 2017, 11:48 AM
This revision was automatically updated to reflect the committed changes.
chapuni reopened this revision.Jul 3 2017, 7:20 PM
chapuni added a subscriber: chapuni.

Excuse me, reverted in rL307054.

Seems a new test, llvm/test/CodeGen/AMDGPU/alignbit-pat.ll wouldn't be up-to-date.
Could you add it, please?

This revision is now accepted and ready to land.Jul 3 2017, 7:20 PM
alex-t closed this revision.Jul 4 2017, 9:07 AM

Excuse me, reverted in rL307054.

Seems a new test, llvm/test/CodeGen/AMDGPU/alignbit-pat.ll wouldn't be up-to-date.
Could you add it, please?

Sure I will. Thank you for handling this.