This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Remove exit-on-error in test (PR27761)
ClosedPublic

Authored by rovka on Jun 1 2016, 1:15 AM.

Details

Summary

The exit-on-error flag was necessary in order to avoid an assertion when handling DYNAMIC_STACKALLOC nodes in SelectionDAGLegalize.

We can avoid the assertion by creating some dummy nodes. This enables us to remove the exit-on-error flag on the first 2 run lines (SI), but on the third run line (R600) we would run into another assertion when trying to reserve indirect registers. This patch also replaces that assertion with an early exit from the function.

Fixes PR27761.

Last exit-on-error patch for AMDGPU

Diff Detail

Repository
rL LLVM

Event Timeline

rovka updated this revision to Diff 59177.Jun 1 2016, 1:15 AM
rovka retitled this revision from to [AMDGPU] Remove exit-on-error in test (PR27761).
rovka updated this object.
rovka added reviewers: arsenm, tstellarAMD.
rovka added subscribers: llvm-commits, rengolin.
rovka updated this revision to Diff 59710.Jun 6 2016, 6:10 AM

Update some tests that I initially forgot about.

rovka updated this revision to Diff 59711.Jun 6 2016, 6:13 AM

...with the initial changes too, ofc.

arsenm added inline comments.Jun 6 2016, 1:37 PM
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
692 ↗(On Diff #59711)

I would prefer not using getIntPtrConstant since I would like to remove it in general from LLVM. This would more preferrably be getConstant(-1, Op.getValueType())

test/CodeGen/AMDGPU/promote-alloca-bitcast-function.ll
9 ↗(On Diff #59711)

I think this can now have a check for the second function's error

rovka updated this revision to Diff 59850.Jun 7 2016, 3:34 AM

Using the -1 constant causes some assertions later on, but 0 works like a charm.
Updated the test, too.
Thanks.

rovka marked 2 inline comments as done.Jun 15 2016, 3:55 AM

Ping?

arsenm accepted this revision.Jun 22 2016, 9:58 AM
arsenm edited edge metadata.

LGTM

test/CodeGen/AMDGPU/private-memory-broken.ll
1 ↗(On Diff #59850)

Can you remove the -mcpu=SI? I've been removing them from tests as they get touched

This revision is now accepted and ready to land.Jun 22 2016, 9:58 AM
rovka added inline comments.Jun 22 2016, 10:33 AM
test/CodeGen/AMDGPU/private-memory-broken.ll
1 ↗(On Diff #59850)

Will do, thanks.

This revision was automatically updated to reflect the committed changes.