This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/GFX10: Fix NSA reassign pass when operands are undef
ClosedPublic

Authored by nhaehnle on Feb 1 2020, 7:02 AM.

Details

Summary

Virtual registers that are undef have an empty LiveInterval at this
point, which means beginIndex() and endIndex() cannot be used. We
only need those indices to determine the range in which to scan for
affected other NSA instructions, and undef operands cannot contribute
to that range.

Diff Detail

Event Timeline

nhaehnle created this revision.Feb 1 2020, 7:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2020, 7:02 AM
arsenm accepted this revision.Feb 1 2020, 7:12 AM

LGTM with nit

llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
292

Treating a loop counter as a boolean is mildly unexpected. I would prefer to write this out as I == 0

This revision is now accepted and ready to land.Feb 1 2020, 7:12 AM

Unit tests: pass. 62373 tests passed, 0 failed and 839 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

rampitec accepted this revision.Feb 1 2020, 10:14 AM
nhaehnle marked an inline comment as done.Feb 1 2020, 1:42 PM
nhaehnle added inline comments.
llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
292

Sure, I'll change that.

This revision was automatically updated to reflect the committed changes.