This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix invalid liveness after si-optimize-exec-masking-pre-ra
ClosedPublic

Authored by arsenm on Jun 15 2022, 12:23 PM.

Details

Reviewers
foad
rampitec
Group Reviewers
Restricted Project
Summary

This was leaving behind a use at the deleted instruction which the
verifier would fail during allocation.

Also fix incorrectly folding if the incoming cndmask was in a
different block.

Diff Detail

Event Timeline

arsenm created this revision.Jun 15 2022, 12:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 12:23 PM
arsenm requested review of this revision.Jun 15 2022, 12:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2022, 12:23 PM
Herald added a subscriber: wdng. · View Herald Transcript
rampitec added inline comments.Jun 15 2022, 12:28 PM
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
201

You probably need to replace it first and the erase.

foad added inline comments.Jun 16 2022, 2:59 AM
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
204

Weird mix of "Idx" and "Index".

piotr added a subscriber: piotr.Jun 16 2022, 11:22 PM
piotr added inline comments.
llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp
121–122

Returns true on success.

arsenm updated this revision to Diff 437935.Jun 17 2022, 9:09 AM

Address comments

rampitec accepted this revision.Jun 17 2022, 1:15 PM
This revision is now accepted and ready to land.Jun 17 2022, 1:15 PM