[Mesa-dev] [PATCH v2 2/2] R600/SI: Optimize SI_KILL for constant operands

Michel Dänzer michel at daenzer.net
Tue Feb 25 20:28:36 PST 2014


On Die, 2014-02-25 at 11:51 -0500, Tom Stellard wrote:
> On Tue, Feb 25, 2014 at 07:36:47PM +0900, Michel Dänzer wrote:
> > From: Michel Dänzer <michel.daenzer at amd.com>
> > 
> > If the SI_KILL operand is constant, we can either clear the exec mask if
> > the operand is negative, or do nothing otherwise.
> > 
> > Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> > ---
> > 
> > v2:
> > * Use just 'SI' as the lit test prefix.
> > 
> >  lib/Target/R600/SIInstructions.td      |  4 ++--
> >  lib/Target/R600/SILowerControlFlow.cpp | 25 ++++++++++++++++++-------
> >  test/CodeGen/R600/llvm.AMDGPU.kill.ll  | 10 +++++++---
> >  3 files changed, 27 insertions(+), 12 deletions(-)
> > 
> > diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
> > index b45da5c..b501645 100644
> > --- a/lib/Target/R600/SIInstructions.td
> > +++ b/lib/Target/R600/SIInstructions.td
> > @@ -1333,7 +1333,7 @@ def SI_END_CF : InstSI <
> >  
> >  def SI_KILL : InstSI <
> >    (outs),
> > -  (ins VReg_32:$src),
> > +  (ins SSrc_32:$src),
> 
> Shouldn't this be VSrc_32?  I think we need to be able to store
> kill conditions in VGPRs, since the condition is per-thread.

Right, good catch, thanks. v3 on the way.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer



More information about the mesa-dev mailing list