forked from OSchip/llvm-project
AMDGPU: Rename glc operand type
While trying to add the glc bit to SMEM instructions on VI with the new refactoring I ran into some kind of shadowing problem for the glc operand when using the pseudoinstruction as a multiclass parameter. Everywhere that currently uses it defines the operand to have the same name as its type, i.e. glc:$glc which works. For some reason now it conflicts, and its up evaluating to the wrong thing. For the real encoding classes, let Inst{16} = !if(ps.has_glc, glc, ?); was not being evaluated and still visible in the Inst initializer in the expanded td file. In other cases I got a a different error about an illegal operand where this was using { 0 } initializer from the bits<1> glc initializer instead of evaluating it as false in the if. For consistency all of the operand types should probably be captialized to avoid conflicting with the variable names unless somebody has a better idea of how to fix this. llvm-svn: 285462
This commit is contained in:
parent
f0a80ba385
commit
4b6a6cc8e9
|
@ -243,15 +243,15 @@ class getMUBUFInsDA<list<RegisterClass> vdataList,
|
|||
RegisterClass vaddrClass = !if(!empty(vaddrList), ?, !head(vaddrList));
|
||||
dag InsNoData = !if(!empty(vaddrList),
|
||||
(ins SReg_128:$srsrc, SCSrc_b32:$soffset,
|
||||
offset:$offset, glc:$glc, slc:$slc, tfe:$tfe),
|
||||
offset:$offset, GLC:$glc, slc:$slc, tfe:$tfe),
|
||||
(ins vaddrClass:$vaddr, SReg_128:$srsrc, SCSrc_b32:$soffset,
|
||||
offset:$offset, glc:$glc, slc:$slc, tfe:$tfe)
|
||||
offset:$offset, GLC:$glc, slc:$slc, tfe:$tfe)
|
||||
);
|
||||
dag InsData = !if(!empty(vaddrList),
|
||||
(ins vdataClass:$vdata, SReg_128:$srsrc,
|
||||
SCSrc_b32:$soffset, offset:$offset, glc:$glc, slc:$slc, tfe:$tfe),
|
||||
SCSrc_b32:$soffset, offset:$offset, GLC:$glc, slc:$slc, tfe:$tfe),
|
||||
(ins vdataClass:$vdata, vaddrClass:$vaddr, SReg_128:$srsrc,
|
||||
SCSrc_b32:$soffset, offset:$offset, glc:$glc, slc:$slc, tfe:$tfe)
|
||||
SCSrc_b32:$soffset, offset:$offset, GLC:$glc, slc:$slc, tfe:$tfe)
|
||||
);
|
||||
dag ret = !if(!empty(vdataList), InsNoData, InsData);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ class FLAT_Real <bits<7> op, FLAT_Pseudo ps> :
|
|||
class FLAT_Load_Pseudo <string opName, RegisterClass regClass> : FLAT_Pseudo<
|
||||
opName,
|
||||
(outs regClass:$vdst),
|
||||
(ins VReg_64:$addr, glc:$glc, slc:$slc, tfe:$tfe),
|
||||
(ins VReg_64:$addr, GLC:$glc, slc:$slc, tfe:$tfe),
|
||||
" $vdst, $addr$glc$slc$tfe"> {
|
||||
let has_data = 0;
|
||||
let mayLoad = 1;
|
||||
|
@ -88,7 +88,7 @@ class FLAT_Load_Pseudo <string opName, RegisterClass regClass> : FLAT_Pseudo<
|
|||
class FLAT_Store_Pseudo <string opName, RegisterClass vdataClass> : FLAT_Pseudo<
|
||||
opName,
|
||||
(outs),
|
||||
(ins VReg_64:$addr, vdataClass:$data, glc:$glc, slc:$slc, tfe:$tfe),
|
||||
(ins VReg_64:$addr, vdataClass:$data, GLC:$glc, slc:$slc, tfe:$tfe),
|
||||
" $addr, $data$glc$slc$tfe"> {
|
||||
let mayLoad = 0;
|
||||
let mayStore = 1;
|
||||
|
|
|
@ -33,7 +33,7 @@ class MIMG_NoSampler_Helper <bits<7> op, string asm,
|
|||
string dns=""> : MIMG_Helper <
|
||||
(outs dst_rc:$vdata),
|
||||
(ins addr_rc:$vaddr, SReg_256:$srsrc,
|
||||
dmask:$dmask, unorm:$unorm, glc:$glc, slc:$slc,
|
||||
dmask:$dmask, unorm:$unorm, GLC:$glc, slc:$slc,
|
||||
r128:$r128, tfe:$tfe, lwe:$lwe, da:$da),
|
||||
asm#" $vdata, $vaddr, $srsrc$dmask$unorm$glc$slc$r128$tfe$lwe$da",
|
||||
dns>, MIMGe<op> {
|
||||
|
@ -64,7 +64,7 @@ class MIMG_Store_Helper <bits<7> op, string asm,
|
|||
RegisterClass addr_rc> : MIMG_Helper <
|
||||
(outs),
|
||||
(ins data_rc:$vdata, addr_rc:$vaddr, SReg_256:$srsrc,
|
||||
dmask:$dmask, unorm:$unorm, glc:$glc, slc:$slc,
|
||||
dmask:$dmask, unorm:$unorm, GLC:$glc, slc:$slc,
|
||||
r128:$r128, tfe:$tfe, lwe:$lwe, da:$da),
|
||||
asm#" $vdata, $vaddr, $srsrc$dmask$unorm$glc$slc$r128$tfe$lwe$da"
|
||||
>, MIMGe<op> {
|
||||
|
@ -98,7 +98,7 @@ class MIMG_Atomic_Helper <string asm, RegisterClass data_rc,
|
|||
RegisterClass addr_rc> : MIMG_Helper <
|
||||
(outs data_rc:$vdst),
|
||||
(ins data_rc:$vdata, addr_rc:$vaddr, SReg_256:$srsrc,
|
||||
dmask:$dmask, unorm:$unorm, glc:$glc, slc:$slc,
|
||||
dmask:$dmask, unorm:$unorm, GLC:$glc, slc:$slc,
|
||||
r128:$r128, tfe:$tfe, lwe:$lwe, da:$da),
|
||||
asm#" $vdst, $vaddr, $srsrc$dmask$unorm$glc$slc$r128$tfe$lwe$da"
|
||||
> {
|
||||
|
@ -159,7 +159,7 @@ class MIMG_Sampler_Helper <bits<7> op, string asm,
|
|||
string dns=""> : MIMG_Helper <
|
||||
(outs dst_rc:$vdata),
|
||||
(ins src_rc:$vaddr, SReg_256:$srsrc, SReg_128:$ssamp,
|
||||
dmask:$dmask, unorm:$unorm, glc:$glc, slc:$slc,
|
||||
dmask:$dmask, unorm:$unorm, GLC:$glc, slc:$slc,
|
||||
r128:$r128, tfe:$tfe, lwe:$lwe, da:$da),
|
||||
asm#" $vdata, $vaddr, $srsrc, $ssamp$dmask$unorm$glc$slc$r128$tfe$lwe$da",
|
||||
dns>, MIMGe<op> {
|
||||
|
@ -196,7 +196,7 @@ class MIMG_Gather_Helper <bits<7> op, string asm,
|
|||
RegisterClass src_rc, int wqm> : MIMG <
|
||||
(outs dst_rc:$vdata),
|
||||
(ins src_rc:$vaddr, SReg_256:$srsrc, SReg_128:$ssamp,
|
||||
dmask:$dmask, unorm:$unorm, glc:$glc, slc:$slc,
|
||||
dmask:$dmask, unorm:$unorm, GLC:$glc, slc:$slc,
|
||||
r128:$r128, tfe:$tfe, lwe:$lwe, da:$da),
|
||||
asm#" $vdata, $vaddr, $srsrc, $ssamp$dmask$unorm$glc$slc$r128$tfe$lwe$da",
|
||||
[]>, MIMGe<op> {
|
||||
|
|
|
@ -372,7 +372,7 @@ def gds : NamedOperandBit<"GDS", NamedMatchClass<"GDS">>;
|
|||
def omod : NamedOperandU32<"OModSI", NamedMatchClass<"OModSI">>;
|
||||
def clampmod : NamedOperandBit<"ClampSI", NamedMatchClass<"ClampSI">>;
|
||||
|
||||
def glc : NamedOperandBit<"GLC", NamedMatchClass<"GLC">>;
|
||||
def GLC : NamedOperandBit<"GLC", NamedMatchClass<"GLC">>;
|
||||
def slc : NamedOperandBit<"SLC", NamedMatchClass<"SLC">>;
|
||||
def tfe : NamedOperandBit<"TFE", NamedMatchClass<"TFE">>;
|
||||
def unorm : NamedOperandBit<"UNorm", NamedMatchClass<"UNorm">>;
|
||||
|
|
Loading…
Reference in New Issue