diff options
author | sstefan1 <sstipanovic@s-energize.com> | 2020-10-12 11:25:52 +0200 |
---|---|---|
committer | sstefan1 <sstipanovic@s-energize.com> | 2020-10-12 11:29:33 +0200 |
commit | a64e8583dafe0fe407e521d546abc9dfb24ba1b3 (patch) | |
tree | 36f3eafe57d2f0a6cb87e6ba565482a52b922384 /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | 8852d30b1c1b3b65cec0147cdf442051aa35e31b (diff) | |
download | llvm-a64e8583dafe0fe407e521d546abc9dfb24ba1b3.zip llvm-a64e8583dafe0fe407e521d546abc9dfb24ba1b3.tar.gz llvm-a64e8583dafe0fe407e521d546abc9dfb24ba1b3.tar.bz2 |
[IR][FIX] Intrinsics - don't apply default willreturn if IntrNoReturn is specified
Summary: Since willreturn will soon be added as default attribute, we can end up with both noreturn and willreturn on the same intrinsic. This was exposed by llvm.wasm.throw which has IntrNoReturn.
Reviewers: jdoerfert, arsenm
Differential Revision: https://reviews.llvm.org/D88644
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 4d3e9ec..af5e213 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -786,9 +786,6 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, 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 @@ CodeGenIntrinsic::CodeGenIntrinsic(Record *R, setProperty(Property); } + // Set default properties to true. + setDefaultProperties(R, DefaultProperties); + // Also record the SDPatternOperator Properties. Properties = parseSDPatternOperatorProperties(R); @@ -845,7 +845,7 @@ void CodeGenIntrinsic::setProperty(Record *R) { 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") |