diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -786,9 +786,6 @@ IS.ParamTypeDefs.push_back(TyEl); } - // Set default properties to true. - setDefaultProperties(R, DefaultProperties); - // Parse the intrinsic properties. ListInit *PropList = R->getValueAsListInit("IntrProperties"); for (unsigned i = 0, e = PropList->size(); i != e; ++i) { @@ -799,6 +796,9 @@ setProperty(Property); } + // Set default properties to true. + setDefaultProperties(R, DefaultProperties); + // Also record the SDPatternOperator Properties. Properties = parseSDPatternOperatorProperties(R); @@ -845,7 +845,7 @@ else if (R->getName() == "IntrNoFree") isNoFree = true; else if (R->getName() == "IntrWillReturn") - isWillReturn = true; + isWillReturn = !isNoReturn; else if (R->getName() == "IntrCold") isCold = true; else if (R->getName() == "IntrSpeculatable")