This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Recompute scc liveness
ClosedPublic

Authored by arsenm on Sep 7 2017, 2:51 PM.

Details

Reviewers
rampitec
Summary

The various scalar bit operations set SCC,
so one is erased or moved it needs to be recomputed.
Not sure why the existing tests don't fail on this.

Diff Detail

Event Timeline

arsenm created this revision.Sep 7 2017, 2:51 PM
rampitec edited edge metadata.Sep 7 2017, 2:56 PM

It shall be caught by the operands analysis below and added only if needed. Do you have test showing problem?

arsenm added a comment.Sep 7 2017, 3:04 PM

It shall be caught by the operands analysis below and added only if needed. Do you have test showing problem?

Yes, it's pretty big though. It seems to only remove one s_or_b64 in it though.

It shall be caught by the operands analysis below and added only if needed. Do you have test showing problem?

Yes, it's pretty big though. It seems to only remove one s_or_b64 in it though.

I think it should not be added here. Instead it shall be added where S_OR_B64 is removed. Then maybe the loop from the first part also has to be copied into the second part of the function, where this instruction is removed:

for (auto &Op : I->operands())
  if (Op.isReg())
    RecalcRegs.insert(Op.getReg());
arsenm updated this revision to Diff 114404.Sep 8 2017, 11:45 AM

Check operands and add test

This revision is now accepted and ready to land.Sep 8 2017, 11:47 AM
arsenm closed this revision.Sep 8 2017, 11:53 AM

r312819