Skip to content

Commit 82f0f7c

Browse files
committed
Fix a problem in previous commit. For GFX940 keep the original
behavior, i.e., op_sel should be 0 for all DOT instructions, not just the VOP3P DOTs.
1 parent f5d32b2 commit 82f0f7c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4626,9 +4626,10 @@ bool AMDGPUAsmParser::validateOpSel(const MCInst &Inst) {
46264626

46274627
uint64_t TSFlags = MII.get(Opc).TSFlags;
46284628

4629-
// For VOP3P DOT instructions, op_sel must be 0 if present, and op_sel_hi
4630-
// cannot be present.
4631-
if ((TSFlags & SIInstrFlags::IsDOT) && (TSFlags & SIInstrFlags::VOP3P)) {
4629+
// For DOT instructions on GFX940, or VOP3P DOT instructions on all targets,
4630+
// op_sel must be 0 if present, and op_sel_hi cannot be present.
4631+
if ((TSFlags & SIInstrFlags::IsDOT) &&
4632+
(isGFX940() || (TSFlags & SIInstrFlags::VOP3P))) {
46324633
int OpSelIdx = AMDGPU::getNamedOperandIdx(Opc, AMDGPU::OpName::op_sel);
46334634
if (OpSelIdx != -1) {
46344635
if (Inst.getOperand(OpSelIdx).getImm() != 0)

0 commit comments

Comments
 (0)