This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Turn s_and_saveexec_b64 into s_and_b64 if result is unused
ClosedPublic

Authored by rampitec on Jul 28 2017, 10:46 AM.

Details

Summary

With SI_END_CF elimination for some nested control flow we can now
eliminate saved exec register completely by turning a saveexec version
of instruction into just a logical instruction.

Diff Detail

Repository
rL LLVM

Event Timeline

rampitec created this revision.Jul 28 2017, 10:46 AM
arsenm added inline comments.Jul 28 2017, 11:38 AM
lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
97–101 ↗(On Diff #108680)

Probably need a MIR test for this, especially with the exotic opcodes we don't emit now

rampitec updated this revision to Diff 108698.Jul 28 2017, 1:16 PM
rampitec marked an inline comment as done.

Added mir test and rebased.

arsenm accepted this revision.Aug 1 2017, 3:58 PM

LGTM

This revision is now accepted and ready to land.Aug 1 2017, 3:58 PM
rampitec updated this revision to Diff 109251.Aug 1 2017, 4:20 PM

Rebase to master

This revision was automatically updated to reflect the committed changes.