[llvm-branch-commits] [llvm-branch] r84024 - in /llvm/branches/Apple/Leela: lib/Target/ARM/ARMISelDAGToDAG.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll
Bill Wendling
isanbard at gmail.com
Tue Oct 13 13:56:05 PDT 2009
Author: void
Date: Tue Oct 13 15:56:05 2009
New Revision: 84024
URL: http://llvm.org/viewvc/llvm-project?rev=84024&view=rev
Log:
$ svn merge -c 84022 https://llvm.org/svn/llvm-project/llvm/trunk
--- Merging r84022 into '.':
U test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll
U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
U lib/Target/ARM/ARMISelDAGToDAG.cpp
Modified:
llvm/branches/Apple/Leela/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/branches/Apple/Leela/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/branches/Apple/Leela/test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll
Modified: llvm/branches/Apple/Leela/lib/Target/ARM/ARMISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=84024&r1=84023&r2=84024&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
+++ llvm/branches/Apple/Leela/lib/Target/ARM/ARMISelDAGToDAG.cpp Tue Oct 13 15:56:05 2009
@@ -2092,14 +2092,10 @@
SelectInlineAsmMemoryOperand(const SDValue &Op, char ConstraintCode,
std::vector<SDValue> &OutOps) {
assert(ConstraintCode == 'm' && "unexpected asm memory constraint");
-
- SDValue Base, Offset, Opc;
- if (!SelectAddrMode2(Op, Op, Base, Offset, Opc))
- return true;
-
- OutOps.push_back(Base);
- OutOps.push_back(Offset);
- OutOps.push_back(Opc);
+ // Require the address to be in a register. That is safe for all ARM
+ // variants and it is hard to do anything much smarter without knowing
+ // how the operand is used.
+ OutOps.push_back(Op);
return false;
}
Modified: llvm/branches/Apple/Leela/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=84024&r1=84023&r2=84024&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/branches/Apple/Leela/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Tue Oct 13 15:56:05 2009
@@ -1017,7 +1017,10 @@
const char *ExtraCode) {
if (ExtraCode && ExtraCode[0])
return true; // Unknown modifier.
- printAddrMode2Operand(MI, OpNum);
+
+ const MachineOperand &MO = MI->getOperand(OpNum);
+ assert(MO.isReg() && "unexpected inline asm memory operand");
+ O << "[" << getRegisterName(MO.getReg()) << "]";
return false;
}
Modified: llvm/branches/Apple/Leela/test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Leela/test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll?rev=84024&r1=84023&r2=84024&view=diff
==============================================================================
--- llvm/branches/Apple/Leela/test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll (original)
+++ llvm/branches/Apple/Leela/test/CodeGen/ARM/2009-05-18-InlineAsmMem.ll Tue Oct 13 15:56:05 2009
@@ -1,7 +1,9 @@
-; RUN: llc < %s -march=arm | grep swp
+; RUN: llc < %s -march=arm | FileCheck %s
+; RUN: llc < %s -march=thumb | FileCheck %s
; PR4091
define void @foo(i32 %i, i32* %p) nounwind {
+;CHECK: swp r2, r0, [r1]
%asmtmp = call i32 asm sideeffect "swp $0, $2, $3", "=&r,=*m,r,*m,~{memory}"(i32* %p, i32 %i, i32* %p) nounwind
ret void
}
More information about the llvm-branch-commits
mailing list