diff --git a/lib/VMCore/InlineAsm.cpp b/lib/VMCore/InlineAsm.cpp index c4e065df057..bd3667db761 100644 --- a/lib/VMCore/InlineAsm.cpp +++ b/lib/VMCore/InlineAsm.cpp @@ -183,12 +183,9 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str, ++I; } else if (*I == '^') { // Multi-letter constraint - // These will only occur with the existing multiple alternative - // constraints and so we can use the isalpha loop below. - StringRef::iterator ConStart = ++I; - while (I != E && isalpha(*I)) - ++I; - pCodes->push_back(std::string(ConStart, I)); + // FIXME: For now assuming these are 2-character constraints. + pCodes->push_back(std::string(I+1, I+3)); + I += 3; } else { // Single letter constraint. pCodes->push_back(std::string(I, I+1)); diff --git a/test/CodeGen/ARM/inlineasm3.ll b/test/CodeGen/ARM/inlineasm3.ll index cf38d8c7183..58687b96924 100644 --- a/test/CodeGen/ARM/inlineasm3.ll +++ b/test/CodeGen/ARM/inlineasm3.ll @@ -50,3 +50,11 @@ entry: call void asm sideeffect "flds s15, $0 \0A", "*^Uv,~{s15}"(float* @k.2126) nounwind ret i32 0 } + +; Radar 9037836 & 9119939 + +define i32 @t5() nounwind { +entry: +call void asm sideeffect "flds s15, $0 \0A", "*^Uvm,~{s15}"(float* @k.2126) nounwind +ret i32 0 +}