look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70685 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 0e9cec4..6874dc0 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -848,10 +848,8 @@
         for (InputNo = 0; InputNo != S.getNumInputs(); ++InputNo) {
           TargetInfo::ConstraintInfo &Input = InputConstraintInfos[InputNo];
           if (Input.hasTiedOperand() &&
-              Input.getTiedOperand() == i) {
-            InputNo = i;
+              Input.getTiedOperand() == i)
             break;
-          }
         }
         assert(InputNo != S.getNumInputs() && "Didn't find matching input!");
         
diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c
index 8aa392a..db65670 100644
--- a/test/CodeGen/asm.c
+++ b/test/CodeGen/asm.c
@@ -77,6 +77,19 @@
   return output;
 }
 
+struct large {
+  int x[1000];
+};
+
+unsigned long t15(int x, struct large *P) {
+  __asm__("xyz "
+          : "=r" (x)
+          : "m" (*P), "0" (x));
+  return x;
+}
+
+
+
 
 // bitfield destination of an asm.
 struct S {