summaryrefslogtreecommitdiff
path: root/lib/Target/AMDGPU
diff options
context:
space:
mode:
authorDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2017-12-22 17:13:28 +0000
committerDmitry Preobrazhensky <dmitry.preobrazhensky@amd.com>2017-12-22 17:13:28 +0000
commitddf9b26bf89cf3728f73453128654afa0a407730 (patch)
tree57b3ce7710e347f299164e94251b5f105edb3c2e /lib/Target/AMDGPU
parent2c8e36132e02ef9db2174285d9a73bf33ab7e7f8 (diff)
[AMDGPU][MC] Corrected parsing of optional operands for ds_swizzle_b32
See bug 35645: https://bugs.llvm.org/show_bug.cgi?id=35645 Reviewers: artem.tamazov, arsenm Differential Revision: https://reviews.llvm.org/D41186 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AMDGPU')
-rw-r--r--lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index 7ecaf0bf87c..25a4420a331 100644
--- a/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ b/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -3852,7 +3852,9 @@ AMDGPUAsmParser::parseSwizzleOp(OperandVector &Operands) {
return Ok? MatchOperand_Success : MatchOperand_ParseFail;
} else {
- return MatchOperand_NoMatch;
+ // Swizzle "offset" operand is optional.
+ // If it is omitted, try parsing other optional operands.
+ return parseOptionalOperand(Operands);
}
}