[llvm] 1f44dfb - [AArch64][AsmParser] Fix bug in operand printer
Cullen Rhodes via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 02:31:49 PDT 2020
Author: Cullen Rhodes
Date: 2020-08-26T09:31:36Z
New Revision: 1f44dfb640cbf04fd348c726950e556883cf7944
URL: https://github.com/llvm/llvm-project/commit/1f44dfb640cbf04fd348c726950e556883cf7944
DIFF: https://github.com/llvm/llvm-project/commit/1f44dfb640cbf04fd348c726950e556883cf7944.diff
LOG: [AArch64][AsmParser] Fix bug in operand printer
The switch in AArch64Operand::print was changed in D45688 so the shift
can be printed after printing the register. This is implemented with
LLVM_FALLTHROUGH and was broken in D52485 when BTIHint was put between
the register and shift operands.
Reviewed By: ostannard
Differential Revision: https://reviews.llvm.org/D86535
Added:
Modified:
llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
index b8d375737e7e..2fe43f9e80e0 100644
--- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
@@ -2071,14 +2071,14 @@ void AArch64Operand::print(raw_ostream &OS) const {
case k_PSBHint:
OS << getPSBHintName();
break;
+ case k_BTIHint:
+ OS << getBTIHintName();
+ break;
case k_Register:
OS << "<register " << getReg() << ">";
if (!getShiftExtendAmount() && !hasShiftExtendAmount())
break;
LLVM_FALLTHROUGH;
- case k_BTIHint:
- OS << getBTIHintName();
- break;
case k_ShiftExtend:
OS << "<" << AArch64_AM::getShiftExtendName(getShiftExtendType()) << " #"
<< getShiftExtendAmount();
More information about the llvm-commits
mailing list