[llvm] r275422 - [AMDGPU] Assembler: fix row_bcast parsing
Sam Kolton via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 14 07:50:35 PDT 2016
Author: skolton
Date: Thu Jul 14 09:50:35 2016
New Revision: 275422
URL: http://llvm.org/viewvc/llvm-project?rev=275422&view=rev
Log:
[AMDGPU] Assembler: fix row_bcast parsing
Summary: This change fix bug 28538
Reviewers: tstellarAMD, vpykhtin
Subscribers: arsenm, kzhuravl
Differential Revision: https://reviews.llvm.org/D22355
Added:
llvm/trunk/test/MC/AMDGPU/regression/bug28538.s
Modified:
llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp?rev=275422&r1=275421&r2=275422&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp Thu Jul 14 09:50:35 2016
@@ -2554,6 +2554,8 @@ AMDGPUAsmParser::parseDPPCtrl(OperandVec
Int = 0x142;
} else if (Int == 31) {
Int = 0x143;
+ } else {
+ return MatchOperand_ParseFail;
}
} else {
return MatchOperand_ParseFail;
Added: llvm/trunk/test/MC/AMDGPU/regression/bug28538.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AMDGPU/regression/bug28538.s?rev=275422&view=auto
==============================================================================
--- llvm/trunk/test/MC/AMDGPU/regression/bug28538.s (added)
+++ llvm/trunk/test/MC/AMDGPU/regression/bug28538.s Thu Jul 14 09:50:35 2016
@@ -0,0 +1,12 @@
+// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOCIVI --check-prefix=NOVI
+// RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSI --check-prefix=NOSICI
+// RUN: not llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSI --check-prefix=NOSICI
+// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOSICI
+
+// NOSICI: error:
+// NOVI: error: failed parsing operand
+v_mov_b32 v0, v0 row_bcast:0
+
+// NOSICI: error:
+// NOVI: error: failed parsing operand
+v_mov_b32 v0, v0 row_bcast:13
More information about the llvm-commits
mailing list