This change switches ON scalarization for global loads.
It finalizes series of changes that fix bugs in AMDGPUAnnotateUniformValues and DivergenceAnalysis.
Details
Diff Detail
Event Timeline
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.
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?