Add a comment for r167040.
authorChad Rosier <mcrosier@apple.com>
Tue, 30 Oct 2012 20:01:12 +0000 (20:01 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 30 Oct 2012 20:01:12 +0000 (20:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167046 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

index eacba90f0ce00a2424c20cd8caac60e477eaadd0..d6016d22fd1d9e0d8f7378f5b645e00b558cfeba 100644 (file)
@@ -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)