[PATCH] D54164: [AMDGPU] Optimize S_CBRANCH_VCC[N]Z -> S_CBRANCH_EXEC[N]Z
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 7 09:27:13 PST 2018
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/SIInsertSkips.cpp:390
+
+ if (!ReadsCond && A->registerDefIsDead(AMDGPU::SCC) &&
+ MI.killsRegister(CondReg, TRI))
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > Is this registerDefIsDead really what you need? I would expect to need to use LivePhysRegs and check if it's live out (which would also avoid dependence on dead flags)
> > This check catches "implicit-def dead $scc", and that is what really produced by the compiler. This is the cheap test comparing to LivePhysRegs use. Any problems with it?
> You're supposed to avoid using kill flags now, but this is a dead flag which I'm less sure about.
I would say unless there is a really good motivation I would avoid liveness recomputation. In addition we know this is an and with exec which we have produced in a specific place. E.g. the situation with live scc cannot even happen, the check is mostly a precaution.
https://reviews.llvm.org/D54164
More information about the llvm-commits
mailing list