mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
If queried as to whether an operation is legal
for a particular MVT, return false if the type is illegal rather than barfing. llvm-svn: 52229
This commit is contained in:
parent
3a11ccc589
commit
e52bc54496
@ -295,8 +295,9 @@ public:
|
||||
/// isOperationLegal - Return true if the specified operation is legal on this
|
||||
/// target.
|
||||
bool isOperationLegal(unsigned Op, MVT VT) const {
|
||||
return getOperationAction(Op, VT) == Legal ||
|
||||
getOperationAction(Op, VT) == Custom;
|
||||
return VT.isSimple() &&
|
||||
(getOperationAction(Op, VT) == Legal ||
|
||||
getOperationAction(Op, VT) == Custom);
|
||||
}
|
||||
|
||||
/// getLoadXAction - Return how this load with extension should be treated:
|
||||
@ -355,8 +356,9 @@ public:
|
||||
/// isIndexedLoadLegal - Return true if the specified indexed load is legal
|
||||
/// on this target.
|
||||
bool isIndexedLoadLegal(unsigned IdxMode, MVT VT) const {
|
||||
return getIndexedLoadAction(IdxMode, VT) == Legal ||
|
||||
getIndexedLoadAction(IdxMode, VT) == Custom;
|
||||
return VT.isSimple() &&
|
||||
(getIndexedLoadAction(IdxMode, VT) == Legal ||
|
||||
getIndexedLoadAction(IdxMode, VT) == Custom);
|
||||
}
|
||||
|
||||
/// getIndexedStoreAction - Return how the indexed store should be treated:
|
||||
@ -375,8 +377,9 @@ public:
|
||||
/// isIndexedStoreLegal - Return true if the specified indexed load is legal
|
||||
/// on this target.
|
||||
bool isIndexedStoreLegal(unsigned IdxMode, MVT VT) const {
|
||||
return getIndexedStoreAction(IdxMode, VT) == Legal ||
|
||||
getIndexedStoreAction(IdxMode, VT) == Custom;
|
||||
return VT.isSimple() &&
|
||||
(getIndexedStoreAction(IdxMode, VT) == Legal ||
|
||||
getIndexedStoreAction(IdxMode, VT) == Custom);
|
||||
}
|
||||
|
||||
/// getConvertAction - Return how the conversion should be treated:
|
||||
@ -395,8 +398,9 @@ public:
|
||||
/// isConvertLegal - Return true if the specified conversion is legal
|
||||
/// on this target.
|
||||
bool isConvertLegal(MVT FromVT, MVT ToVT) const {
|
||||
return getConvertAction(FromVT, ToVT) == Legal ||
|
||||
getConvertAction(FromVT, ToVT) == Custom;
|
||||
return FromVT.isSimple() && ToVT.isSimple() &&
|
||||
(getConvertAction(FromVT, ToVT) == Legal ||
|
||||
getConvertAction(FromVT, ToVT) == Custom);
|
||||
}
|
||||
|
||||
/// getTypeToPromoteTo - If the action for this operation is to promote, this
|
||||
|
Loading…
Reference in New Issue
Block a user