From 3d71688476951d56ac00a81b17c2f83fd781b208 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Tue, 30 Oct 2012 19:11:54 +0000 Subject: [inline asm] Implement mayLoad and mayStore for inline assembly. In general, the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation. For inline assembly, however, we need to compute these based on the constraints. Revert r166929 as this is no longer needed, but leave the test case in place. rdar://12033048 and PR13504 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp') diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index d1baa3f716..5fc71cc223 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -903,6 +903,13 @@ EmitSpecialNode(SDNode *Node, bool IsClone, bool IsCloned, getZExtValue(); MI->addOperand(MachineOperand::CreateImm(ExtraInfo)); + // Set the MayLoad and MayStore flags. + if (ExtraInfo & InlineAsm::Extra_MayLoad) + MI->setFlag(MachineInstr::MayLoad); + + if (ExtraInfo & InlineAsm::Extra_MayStore) + MI->setFlag(MachineInstr::MayStore); + // Remember to operand index of the group flags. SmallVector GroupIdx; -- cgit v1.2.3