mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
[CodeGen] Use MVT iterator_ranges in legality loops. NFC intended.
A few loops do trickier things than just iterating on an MVT subset, so I'll leave them be for now. Follow-up of r225387. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225392 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -748,37 +748,32 @@ void TargetLoweringBase::initActions() {
|
||||
memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray));
|
||||
|
||||
// Set default actions for various operations.
|
||||
for (unsigned VT = 0; VT != (unsigned)MVT::LAST_VALUETYPE; ++VT) {
|
||||
for (MVT VT : MVT::all_valuetypes()) {
|
||||
// Default all indexed load / store to expand.
|
||||
for (unsigned IM = (unsigned)ISD::PRE_INC;
|
||||
IM != (unsigned)ISD::LAST_INDEXED_MODE; ++IM) {
|
||||
setIndexedLoadAction(IM, (MVT::SimpleValueType)VT, Expand);
|
||||
setIndexedStoreAction(IM, (MVT::SimpleValueType)VT, Expand);
|
||||
setIndexedLoadAction(IM, VT, Expand);
|
||||
setIndexedStoreAction(IM, VT, Expand);
|
||||
}
|
||||
|
||||
// Most backends expect to see the node which just returns the value loaded.
|
||||
setOperationAction(ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS,
|
||||
(MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS, VT, Expand);
|
||||
|
||||
// These operations default to expand.
|
||||
setOperationAction(ISD::FGETSIGN, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::CONCAT_VECTORS, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::FMINNUM, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::FMAXNUM, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::FGETSIGN, VT, Expand);
|
||||
setOperationAction(ISD::CONCAT_VECTORS, VT, Expand);
|
||||
setOperationAction(ISD::FMINNUM, VT, Expand);
|
||||
setOperationAction(ISD::FMAXNUM, VT, Expand);
|
||||
|
||||
// These library functions default to expand.
|
||||
setOperationAction(ISD::FROUND, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::FROUND, VT, Expand);
|
||||
|
||||
// These operations default to expand for vector types.
|
||||
if (VT >= MVT::FIRST_VECTOR_VALUETYPE &&
|
||||
VT <= MVT::LAST_VECTOR_VALUETYPE) {
|
||||
setOperationAction(ISD::FCOPYSIGN, (MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::ANY_EXTEND_VECTOR_INREG,
|
||||
(MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::SIGN_EXTEND_VECTOR_INREG,
|
||||
(MVT::SimpleValueType)VT, Expand);
|
||||
setOperationAction(ISD::ZERO_EXTEND_VECTOR_INREG,
|
||||
(MVT::SimpleValueType)VT, Expand);
|
||||
if (VT.isVector()) {
|
||||
setOperationAction(ISD::FCOPYSIGN, VT, Expand);
|
||||
setOperationAction(ISD::ANY_EXTEND_VECTOR_INREG, VT, Expand);
|
||||
setOperationAction(ISD::SIGN_EXTEND_VECTOR_INREG, VT, Expand);
|
||||
setOperationAction(ISD::ZERO_EXTEND_VECTOR_INREG, VT, Expand);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user