summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-30 20:01:12 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-30 20:01:12 +0000
commitdfa4cecb1e549d96f800f7ebc793a342d8df1244 (patch)
tree1a0f6894db18b653ea7ef8d22f630c2df36f6e7d /lib/CodeGen/SelectionDAG
parent415f869cf30a272072c0533a2dea85496a210309 (diff)
downloadllvm-dfa4cecb1e549d96f800f7ebc793a342d8df1244.tar.gz
llvm-dfa4cecb1e549d96f800f7ebc793a342d8df1244.tar.bz2
llvm-dfa4cecb1e549d96f800f7ebc793a342d8df1244.tar.xz
Add a comment for r167040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index eacba90f0c..d6016d22fd 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -6145,6 +6145,10 @@ void SelectionDAGBuilder::visitInlineAsm(ImmutableCallSite CS) {
// Compute the constraint code and ConstraintType to use.
TLI.ComputeConstraintToUse(OpInfo, SDValue());
+ // Ideally, we would only check against memory constraints. However, the
+ // meaning of an other constraint can be target-specific and we can't easily
+ // reason about it. Therefore, be conservative and set MayLoad/MayStore
+ // for other constriants as well.
if (OpInfo.ConstraintType == TargetLowering::C_Memory ||
OpInfo.ConstraintType == TargetLowering::C_Other) {
if (OpInfo.Type == InlineAsm::isInput)