mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
[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
This commit is contained in:
parent
1f4a4b5675
commit
6a1e373c9c
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user