enum LegalizeAction
Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:43
Enumerators
Name | Value | Comment |
---|---|---|
Legal | 0 | The operation is expected to be selectable directly by the target, and no transformation is necessary. |
NarrowScalar | 1 | The operation should be synthesized from multiple instructions acting on a narrower scalar base-type. For example a 64-bit add might be implemented in terms of 32-bit add-with-carry. |
WidenScalar | 2 | The operation should be implemented in terms of a wider scalar base-type. For example a < 2 x s8> add could be implemented as a < 2 x s32> add (ignoring the high bits). |
FewerElements | 3 | The (vector) operation should be implemented by splitting it into sub-vectors where the operation is legal. For example a < 8 x s64> add might be implemented as 4 separate < 2 x s64> adds. There can be a leftover if there are not enough elements for last sub-vector e.g. < 7 x s64> add will be implemented as 3 separate < 2 x s64> adds and one s64 add. Leftover types can be avoided by doing MoreElements first. |
MoreElements | 4 | The (vector) operation should be implemented by widening the input vector and ignoring the lanes added by doing so. For example < 2 x i8> is rarely legal, but you might perform an < 8 x i8> and then only look at the first two results. |
Bitcast | 5 | Perform the operation on a different, but equivalently sized type. |
Lower | 6 | The operation itself must be expressed in terms of simpler actions on this target. E.g. a SREM replaced by an SDIV and subtraction. |
Libcall | 7 | The operation should be implemented as a call to some kind of runtime support library. For example this usually happens on machines that don't support floating-point operations natively. |
Custom | 8 | The target wants to do something special with this combination of operand and type. A callback will be issued when it is needed. |
Unsupported | 9 | This operation is completely unsupported on the target. A programming error has occurred. |
NotFound | 10 | Sentinel value for when no action was found in the specified table. |
UseLegacyRules | 11 | Fall back onto the old rules. TODO: Remove this once we've migrated |