PATCH: R600/SI: Add ComplexPattern to match MUBUF variant with no VADDR

Tom Stellard tom at stellard.net
Mon Aug 11 07:09:48 PDT 2014


On Wed, Aug 06, 2014 at 03:17:47PM -0700, Matt Arsenault wrote:
> On 08/06/2014 11:29 AM, Tom Stellard wrote:
> >Hi,
> >
> >The attached patches add a ComplexPattern that will enable a no-vaddr
> >variant of MUBUF instructions to be used for loads and stores with either
> >no offset, or an immediate offset that can be folded into the instruction.
> >This change will save use 2 VGPRs in these scenarios.
> >
> >-Tom
> >
> >0001-R600-SI-Clear-lds-bit-on-MUBUF-instructions-used-for.patch
> >
> >
> > From 947090335ef64e7894a5f94ca2dd42ecf8757048 Mon Sep 17 00:00:00 2001
> >From: Tom Stellard<thomas.stellard at amd.com>
> >Date: Wed, 6 Aug 2014 11:42:14 -0400
> >Subject: [PATCH 1/4] R600/SI: Clear lds bit on MUBUF instructions used for
> >  private stores
> >
> >This bit was left uninitialized, which was causing some random failures
> >of piglit tests.
> >
> >NOTE: This is a candidate for the 3.5 branch.
> >---
> >  lib/Target/R600/SIInstrInfo.td      |  1 +
> >  test/CodeGen/R600/private-memory.ll | 16 ++++++++--------
> >  2 files changed, 9 insertions(+), 8 deletions(-)
> >
> >diff --git a/lib/Target/R600/SIInstrInfo.td b/lib/Target/R600/SIInstrInfo.td
> >index d2bce85..7bc8705 100644
> >--- a/lib/Target/R600/SIInstrInfo.td
> >+++ b/lib/Target/R600/SIInstrInfo.td
> >@@ -974,6 +974,7 @@ multiclass MUBUF_Store_Helper <bits<7> op, string name, RegisterClass vdataClass
> >      name#" $vdata, $vaddr, $srsrc, $soffset"#"$offen"#"$idxen"#"$offset"#"$glc"#"$slc"#"$tfe",
> >      []
> >    > {
> >+    let lds = 0;
> >      let addr64 = 0;
> >    }
> Should the base class MUBUF set this instead?
> 

I would rather set it here, because if we set it in the base class and
then decide we want to add a variant the loads data into LDS, then
someone may remove it from the base class and forget to add it to
all the subclasses.

Here are some updated patches.  Mostly the same, but I had to
update the areLoadsFromSameBasePtr function to handle the new
MUBUF variant.

-Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-SI-Fix-broken-test.patch
Type: text/x-diff
Size: 1936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/b20666ef/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-R600-SI-Clear-lds-bit-on-MUBUF-instructions-used-for.patch
Type: text/x-diff
Size: 4220 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/b20666ef/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-R600-SI-Add-check-for-low-32-bits-of-encoding-to-mub.patch
Type: text/x-diff
Size: 4226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/b20666ef/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-R600-SI-Add-an-_OFFEN-variant-MUBUF_STORE_-and-use-i.patch
Type: text/x-diff
Size: 3955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/b20666ef/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-R600-SI-Add-a-ComplexPattern-for-selecting-MUBUF-_OF.patch
Type: text/x-diff
Size: 38703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/b20666ef/attachment-0004.patch>


More information about the llvm-commits mailing list