summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2013-01-08 18:02:19 -0600
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-01-13 12:27:30 +0100
commit19e7d419f9d3b5cc9333b58859d9e215c8c40150 (patch)
tree0672cfcca59b4974422bd11428c94af048039111 /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parentab38b966e20ecfc5ea0fd6ea1576eb8925071a62 (diff)
downloadllvm-cd25cd941c467e4e3de92b5667dc0f71a7006853.tar.gz
llvm-cd25cd941c467e4e3de92b5667dc0f71a7006853.tar.bz2
llvm-cd25cd941c467e4e3de92b5667dc0f71a7006853.tar.xz
Properly recognize "memory" constraint in clobber list of inline asm.embtoolkit-1.1.0
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 3fbf7c2fe6..b055696b90 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6052,6 +6052,10 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
// Compute the constraint code and ConstraintType to use.
TLI.ComputeConstraintToUse(OpInfo, OpInfo.CallOperand, &DAG);
+ if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
+ OpInfo.Type == InlineAsm::isClobber)
+ continue;
+
// If this is a memory input, and if the operand is not indirect, do what we
// need to to provide an address for the memory input.
if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
@@ -6155,6 +6159,8 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
ExtraInfo |= InlineAsm::Extra_MayLoad;
else if (OpInfo.Type == InlineAsm::isOutput)
ExtraInfo |= InlineAsm::Extra_MayStore;
+ else if (OpInfo.Type == InlineAsm::isClobber)
+ ExtraInfo |= (InlineAsm::Extra_MayLoad | InlineAsm::Extra_MayStore);
}
}