forked from OSchip/llvm-project
Allow legalization of target-specific SDNodes, provided that the target itself provide a legalization hook for them.
llvm-svn: 161536
This commit is contained in:
parent
89b1f2c7e1
commit
be8130dc48
|
@ -366,7 +366,9 @@ public:
|
|||
/// for it.
|
||||
LegalizeAction getOperationAction(unsigned Op, EVT VT) const {
|
||||
if (VT.isExtended()) return Expand;
|
||||
assert(Op < array_lengthof(OpActions[0]) && "Table isn't big enough!");
|
||||
// If a target-specific SDNode requires legalization, require the target
|
||||
// to provide custom legalization for it.
|
||||
if (Op > array_lengthof(OpActions[0])) return Custom;
|
||||
unsigned I = (unsigned) VT.getSimpleVT().SimpleTy;
|
||||
return (LegalizeAction)OpActions[I][Op];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue