mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Allow legalization of target-specific SDNodes, provided that the target itself provide a legalization hook for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161536 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e723007ee6
commit
12864689d1
@ -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…
x
Reference in New Issue
Block a user