[PATCH] D114216: [asm] Remove explicit branch for modifier 'l'
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 19 06:20:13 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4f9a5c2a1438: [asm] Remove explicit branch for modifier 'l' (authored by thakis).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114216/new/
https://reviews.llvm.org/D114216
Files:
llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
llvm/lib/Target/AVR/AVRAsmPrinter.cpp
llvm/test/CodeGen/AVR/inline-asm/inline-asm-invalid.ll
Index: llvm/test/CodeGen/AVR/inline-asm/inline-asm-invalid.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/AVR/inline-asm/inline-asm-invalid.ll
@@ -0,0 +1,10 @@
+; RUN: not llc < %s -march=avr -no-integrated-as 2>&1 | FileCheck %s
+
+define void @foo(i16 %a) {
+ ; CHECK: error: invalid operand in inline asm: 'jl ${0:l}'
+ %i.addr = alloca i32, align 4
+ call void asm sideeffect "jl ${0:l}", "*m"(i32* %i.addr)
+
+ ret void
+}
+
Index: llvm/lib/Target/AVR/AVRAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/AVR/AVRAsmPrinter.cpp
+++ llvm/lib/Target/AVR/AVRAsmPrinter.cpp
@@ -144,9 +144,8 @@
bool AVRAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
unsigned OpNum, const char *ExtraCode,
raw_ostream &O) {
- if (ExtraCode && ExtraCode[0]) {
- llvm_unreachable("This branch is not implemented yet");
- }
+ if (ExtraCode && ExtraCode[0])
+ return true; // Unknown modifier
const MachineOperand &MO = MI->getOperand(OpNum);
(void)MO;
Index: llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -453,8 +453,6 @@
} else if (MI->getOperand(OpNo).isMBB()) {
const MCSymbol *Sym = MI->getOperand(OpNo).getMBB()->getSymbol();
Sym->print(OS, AP->MAI);
- } else if (Modifier[0] == 'l') {
- Error = true;
} else if (InlineAsm::isMemKind(OpFlags)) {
Error = AP->PrintAsmMemoryOperand(
MI, OpNo, Modifier[0] ? Modifier : nullptr, OS);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114216.388485.patch
Type: text/x-patch
Size: 1833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211119/b754f538/attachment.bin>
More information about the llvm-commits
mailing list