This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Replace shrunk instruction with dummy implicit_def
ClosedPublic

Authored by arsenm on May 2 2019, 3:49 AM.

Details

Reviewers
rampitec
Summary

This was broken if the original operand was killed. The kill flag
would appear on both instructions, and fail the verifier. Keep the
kill flag, but remove the operands from the old instruction. This has
an added benefit of really reducing the use count for future folds.

Ideally the pass would be structured more like what PeepholeOptimizer
does to avoid this hack to avoid breaking instruction iterators.

Diff Detail

Event Timeline

arsenm created this revision.May 2 2019, 3:49 AM
This revision is now accepted and ready to land.May 2 2019, 10:46 AM
arsenm closed this revision.May 3 2019, 7:38 AM

r359891