[PATCH] D15735: AMDGPU/SI: Fix encoding of flat instructions on VI

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 18:48:38 PST 2015


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.td:2598
@@ +2597,3 @@
+    dag outs = (outs regClass:$vdst),
+    dag ins = (ins VReg_64:$addr, glc_flat:$glc, slc_flat:$slc, tfe_flat:$tfe),
+    string asm = asm_name#" $vdst, $addr"#"$glc"#"$slc"#"$tfe"> {
----------------
arsenm wrote:
> tstellarAMD wrote:
> > The assembler needs to know the full list of optional operands when parsing, so glc_flat, slc_flat, tfe_flat all map to the same list of optional operands.  The optional operands are different for flat than mubuf, which is why they need a different operand type.
> I don't get why this would matter. We already have some instructions that may or may not have clamp etc.
The difference is, for flat there are 3 possible optional args: glc,slc,tfe, but for flat atomic there are only two optional args: slc, tfe. so the operand sets need to have different names.


http://reviews.llvm.org/D15735





More information about the llvm-commits mailing list