Page MenuHomePhabricator

Fix for regression after Global Load Scalarization patch
ClosedPublic

Authored by alex-t on Dec 14 2016, 4:16 AM.

Details

Reviewers
tstellarAMD
arsenm
Group Reviewers
Restricted Project

Diff Detail

Event Timeline

alex-t updated this revision to Diff 81366.Dec 14 2016, 4:16 AM
alex-t retitled this revision from to Fix for regression after Global Load Scalarization patch.
alex-t updated this object.
alex-t added reviewers: Restricted Project, tstellarAMD.
test/CodeGen/AMDGPU/mesa_regression.ll
4

There should be a CHECK line here to check for the expected load instruction.

alex-t added inline comments.Dec 14 2016, 7:50 AM
test/CodeGen/AMDGPU/mesa_regression.ll
4

No. This patch fixes compiler error - not incorrect code generation.
With this change test can be compiled w/o errors with -amdgpu-scalarize-global-loads=false. LIT reports test as PASSED. W/o change compilation aborts with error and LIT reports test as FAILED.
Presence of any vector or scalar loads in output does not test anything.

test/CodeGen/AMDGPU/mesa_regression.ll
4

The original error was 'Cannot Select...', so we should add a check line that verifies we are able to select this node now. This is what we've always done when adding tests for these kinds of failures.

alex-t updated this revision to Diff 81383.Dec 14 2016, 8:08 AM
alex-t edited edge metadata.

Test changed

alex-t marked an inline comment as done.Dec 14 2016, 8:08 AM
kzhuravl added inline comments.
lib/Target/AMDGPU/SIISelLowering.cpp
2788–2790

Can we check Subtarget->getScalarizeGlobalBehavior() first? Other checks are more expensive. Also formatting.

alex-t added inline comments.Dec 14 2016, 8:37 AM
lib/Target/AMDGPU/SIISelLowering.cpp
2788–2790

Yes. Good point about the check order. Thanks

alex-t updated this revision to Diff 81390.Dec 14 2016, 8:45 AM
alex-t edited edge metadata.

I think it would be better to just add run line to the original test with the option disabled

test/CodeGen/AMDGPU/mesa_regression.ll
1

You don't need -O2

I think it would be better to just add run line to the original test with the option disabled

Exactly! ) This is the point I started with. The option is "false" by default and I considered that we don't need separate test for this.

t-tye added a subscriber: t-tye.Mar 22 2017, 6:23 PM
arsenm accepted this revision.Aug 3 2017, 4:49 PM

Looks like this was r289822

This revision is now accepted and ready to land.Aug 3 2017, 4:49 PM
arsenm closed this revision.Aug 3 2017, 4:49 PM