mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 07:05:03 +00:00
R600/SI: Add an _OFFEN variant MUBUF_STORE_* and use it for scratch writes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
68e9ebbe44
commit
f56c55d003
@ -967,17 +967,30 @@ multiclass MUBUF_Load_Helper <bits<7> op, string asm, RegisterClass regClass,
|
|||||||
multiclass MUBUF_Store_Helper <bits<7> op, string name, RegisterClass vdataClass,
|
multiclass MUBUF_Store_Helper <bits<7> op, string name, RegisterClass vdataClass,
|
||||||
ValueType store_vt, SDPatternOperator st> {
|
ValueType store_vt, SDPatternOperator st> {
|
||||||
|
|
||||||
|
let addr64 = 0, lds = 0 in {
|
||||||
|
|
||||||
def "" : MUBUF <
|
def "" : MUBUF <
|
||||||
op, (outs),
|
op, (outs),
|
||||||
(ins vdataClass:$vdata, SReg_128:$srsrc, VReg_32:$vaddr, SSrc_32:$soffset,
|
(ins vdataClass:$vdata, SReg_128:$srsrc, VReg_32:$vaddr, SSrc_32:$soffset,
|
||||||
mbuf_offset:$offset, offen:$offen, idxen:$idxen, glc:$glc, slc:$slc,
|
mbuf_offset:$offset, offen:$offen, idxen:$idxen, glc:$glc, slc:$slc,
|
||||||
tfe:$tfe),
|
tfe:$tfe),
|
||||||
name#" $vdata, $vaddr, $srsrc, $soffset"#"$offen"#"$idxen"#"$offset"#"$glc"#"$slc"#"$tfe",
|
name#" $vdata, $vaddr, $srsrc, $soffset"#"$offen"#"$idxen"#"$offset"#
|
||||||
|
"$glc"#"$slc"#"$tfe",
|
||||||
[]
|
[]
|
||||||
> {
|
>;
|
||||||
let lds = 0;
|
|
||||||
let addr64 = 0;
|
let offen = 1, idxen = 0 in {
|
||||||
}
|
def _OFFEN : MUBUF <
|
||||||
|
op, (outs),
|
||||||
|
(ins vdataClass:$vdata, SReg_128:$srsrc, VReg_32:$vaddr, SSrc_32:$soffset,
|
||||||
|
mbuf_offset:$offset, glc:$glc, slc:$slc, tfe:$tfe),
|
||||||
|
name#" $vdata, $vaddr, $srsrc, $soffset offen"#"$offset"#
|
||||||
|
"$glc"#"$slc"#"$tfe",
|
||||||
|
[]
|
||||||
|
>;
|
||||||
|
} // end offen = 1, idxen = 0
|
||||||
|
|
||||||
|
} // End addr64 = 0, lds = 0
|
||||||
|
|
||||||
def _ADDR64 : MUBUF <
|
def _ADDR64 : MUBUF <
|
||||||
op, (outs),
|
op, (outs),
|
||||||
|
@ -2717,18 +2717,16 @@ defm : MUBUF_Load_Dword <v4i32, BUFFER_LOAD_DWORDX4_OFFSET, BUFFER_LOAD_DWORDX4_
|
|||||||
BUFFER_LOAD_DWORDX4_IDXEN, BUFFER_LOAD_DWORDX4_BOTHEN>;
|
BUFFER_LOAD_DWORDX4_IDXEN, BUFFER_LOAD_DWORDX4_BOTHEN>;
|
||||||
|
|
||||||
class MUBUFScratchStorePat <MUBUF Instr, ValueType vt, PatFrag st> : Pat <
|
class MUBUFScratchStorePat <MUBUF Instr, ValueType vt, PatFrag st> : Pat <
|
||||||
(st vt:$value, (MUBUFAddr32 v4i32:$srsrc, i32:$vaddr, i32:$soffset,
|
(st vt:$value, (MUBUFScratch v4i32:$srsrc, i32:$vaddr, i32:$soffset,
|
||||||
u16imm:$offset, i1imm:$offen, i1imm:$idxen,
|
u16imm:$offset)),
|
||||||
i1imm:$glc, i1imm:$slc, i1imm:$tfe)),
|
(Instr $value, $srsrc, $vaddr, $soffset, $offset, 0, 0, 0)
|
||||||
(Instr $value, $srsrc, $vaddr, $soffset, $offset, $offen, $idxen,
|
|
||||||
$glc, $slc, $tfe)
|
|
||||||
>;
|
>;
|
||||||
|
|
||||||
def : MUBUFScratchStorePat <BUFFER_STORE_BYTE, i32, truncstorei8_private>;
|
def : MUBUFScratchStorePat <BUFFER_STORE_BYTE_OFFEN, i32, truncstorei8_private>;
|
||||||
def : MUBUFScratchStorePat <BUFFER_STORE_SHORT, i32, truncstorei16_private>;
|
def : MUBUFScratchStorePat <BUFFER_STORE_SHORT_OFFEN, i32, truncstorei16_private>;
|
||||||
def : MUBUFScratchStorePat <BUFFER_STORE_DWORD, i32, store_private>;
|
def : MUBUFScratchStorePat <BUFFER_STORE_DWORD_OFFEN, i32, store_private>;
|
||||||
def : MUBUFScratchStorePat <BUFFER_STORE_DWORDX2, v2i32, store_private>;
|
def : MUBUFScratchStorePat <BUFFER_STORE_DWORDX2_OFFEN, v2i32, store_private>;
|
||||||
def : MUBUFScratchStorePat <BUFFER_STORE_DWORDX4, v4i32, store_private>;
|
def : MUBUFScratchStorePat <BUFFER_STORE_DWORDX4_OFFEN, v4i32, store_private>;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
class MUBUFStore_Pattern <MUBUF Instr, ValueType vt, PatFrag st> : Pat <
|
class MUBUFStore_Pattern <MUBUF Instr, ValueType vt, PatFrag st> : Pat <
|
||||||
|
Loading…
Reference in New Issue
Block a user