diff --git a/llvm/lib/Target/AMDGPU/BUFInstructions.td b/llvm/lib/Target/AMDGPU/BUFInstructions.td index ea98b3a8cd065..44fd4ef864127 100644 --- a/llvm/lib/Target/AMDGPU/BUFInstructions.td +++ b/llvm/lib/Target/AMDGPU/BUFInstructions.td @@ -637,7 +637,8 @@ class getMUBUFAtomicInsDA class DefaultOperand : OperandWithDefaultOps, - CustomOperandProps<1, Op.ParserMatchClass.Name> { - let PredicateMethod = Op.ParserMatchClass.PredicateMethod; - let ParserMethod = Op.ParserMatchClass.ParserMethod; + CustomOperandProps<1> { + let ParserMatchClass = Op.ParserMatchClass; let PrintMethod = Op.PrintMethod; } @@ -1080,6 +1079,8 @@ def CPol_0 : DefaultOperand; def CPol_GLC1 : DefaultOperand; def CPol_GLC : ValuePredicatedOperand; def CPol_NonGLC : ValuePredicatedOperand; +def CPol_GLC_WithDefault : DefaultOperand; +def CPol_NonGLC_WithDefault : DefaultOperand; def TFE : NamedBitOperand<"tfe">; def UNorm : NamedBitOperand<"unorm">; diff --git a/llvm/test/MC/AMDGPU/atomic-fadd-insts.s b/llvm/test/MC/AMDGPU/atomic-fadd-insts.s index e112cce30cffe..6739110215066 100644 --- a/llvm/test/MC/AMDGPU/atomic-fadd-insts.s +++ b/llvm/test/MC/AMDGPU/atomic-fadd-insts.s @@ -41,7 +41,7 @@ buffer_atomic_add_f32 v5, off, s[8:11], s3 offset:7 // GFX908: encoding: [0x07,0x00,0x34,0xe1,0x00,0x05,0x02,0x03] buffer_atomic_add_f32 v5, off, s[8:11], s3 offset:4095 glc -// GFX908-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use glc +// GFX908-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode buffer_atomic_add_f32 v5, off, s[8:11], s3 offset:4095 slc // GFX908: encoding: [0xff,0x0f,0x36,0xe1,0x00,0x05,0x02,0x03] @@ -86,7 +86,7 @@ buffer_atomic_pk_add_f16 v5, off, s[8:11], s3 offset:7 // GFX908: encoding: [0x07,0x00,0x38,0xe1,0x00,0x05,0x02,0x03] buffer_atomic_pk_add_f16 v5, off, s[8:11], s3 offset:4095 glc -// GFX908-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use glc +// GFX908-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode buffer_atomic_pk_add_f16 v5, off, s[8:11], s3 offset:4095 slc // GFX908: encoding: [0xff,0x0f,0x3a,0xe1,0x00,0x05,0x02,0x03] diff --git a/llvm/test/MC/AMDGPU/gfx90a_asm_features.s b/llvm/test/MC/AMDGPU/gfx90a_asm_features.s index d5f2755582d25..31f51eb1be2c2 100644 --- a/llvm/test/MC/AMDGPU/gfx90a_asm_features.s +++ b/llvm/test/MC/AMDGPU/gfx90a_asm_features.s @@ -955,17 +955,17 @@ v_xor_b32 v6, v29, v27 row_newbcast:15 // GFX90A: buffer_atomic_add_f32 v0, v2, s[4:7], 0 idxen glc ; encoding: [0x00,0x60,0x34,0xe1,0x02,0x00,0x01,0x80] // GFX1010: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU -// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: instruction must not use glc +// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode buffer_atomic_add_f32 v0, v2, s[4:7], 0 idxen glc // GFX90A: buffer_atomic_add_f32 v0, v2, s[4:7], 0 idxen glc ; encoding: [0x00,0x60,0x34,0xe1,0x02,0x00,0x01,0x80] // GFX1010: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU -// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: instruction must not use glc +// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode buffer_atomic_add_f32 v0, v2, s[4:7], 0 idxen glc // GFX90A: buffer_atomic_pk_add_f16 v0, v2, s[4:7], 0 idxen glc ; encoding: [0x00,0x60,0x38,0xe1,0x02,0x00,0x01,0x80] // GFX1010: :[[@LINE+2]]:{{[0-9]+}}: error: instruction not supported on this GPU -// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: instruction must not use glc +// GFX908: :[[@LINE+1]]:{{[0-9]+}}: error: operands are not valid for this GPU or mode buffer_atomic_pk_add_f16 v0, v2, s[4:7], 0 idxen glc // GFX90A: global_atomic_add_f32 v0, v[0:1], v2, off glc ; encoding: [0x00,0x80,0x35,0xdd,0x00,0x02,0x7f,0x00]