[PATCH] D88644: [IR][FIX] Intrinsics - don't apply default willreturn if IntrNoReturn is specified
Stefan Stipanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 02:35:42 PDT 2020
sstefan1 created this revision.
sstefan1 added reviewers: jdoerfert, arsenm.
Herald added subscribers: llvm-commits, sunfish.
Herald added a project: LLVM.
sstefan1 requested review of this revision.
Herald added subscribers: aheejin, wdng.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88644
Files:
llvm/utils/TableGen/CodeGenTarget.cpp
Index: llvm/utils/TableGen/CodeGenTarget.cpp
===================================================================
--- llvm/utils/TableGen/CodeGenTarget.cpp
+++ llvm/utils/TableGen/CodeGenTarget.cpp
@@ -780,9 +780,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) {
@@ -793,6 +790,9 @@
setProperty(Property);
}
+ // Set default properties to true.
+ setDefaultProperties(R, DefaultProperties);
+
// Also record the SDPatternOperator Properties.
Properties = parseSDPatternOperatorProperties(R);
@@ -839,7 +839,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")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88644.295503.patch
Type: text/x-patch
Size: 1060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201001/4cca91e5/attachment.bin>
More information about the llvm-commits
mailing list