Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 294 Lines • ▼ Show 20 Lines | SystemZTargetLowering::SystemZTargetLowering(const TargetMachine &TM, | ||||
// Use custom expanders so that we can force the function to use | // Use custom expanders so that we can force the function to use | ||||
// a frame pointer. | // a frame pointer. | ||||
setOperationAction(ISD::STACKSAVE, MVT::Other, Custom); | setOperationAction(ISD::STACKSAVE, MVT::Other, Custom); | ||||
setOperationAction(ISD::STACKRESTORE, MVT::Other, Custom); | setOperationAction(ISD::STACKRESTORE, MVT::Other, Custom); | ||||
// Handle prefetches with PFD or PFDRL. | // Handle prefetches with PFD or PFDRL. | ||||
setOperationAction(ISD::PREFETCH, MVT::Other, Custom); | setOperationAction(ISD::PREFETCH, MVT::Other, Custom); | ||||
for (MVT VT : MVT::vector_valuetypes()) { | for (MVT VT : MVT::fixedlen_vector_valuetypes()) { | ||||
// Assume by default that all vector operations need to be expanded. | // Assume by default that all vector operations need to be expanded. | ||||
for (unsigned Opcode = 0; Opcode < ISD::BUILTIN_OP_END; ++Opcode) | for (unsigned Opcode = 0; Opcode < ISD::BUILTIN_OP_END; ++Opcode) | ||||
if (getOperationAction(Opcode, VT) == Legal) | if (getOperationAction(Opcode, VT) == Legal) | ||||
setOperationAction(Opcode, VT, Expand); | setOperationAction(Opcode, VT, Expand); | ||||
// Likewise all truncating stores and extending loads. | // Likewise all truncating stores and extending loads. | ||||
for (MVT InnerVT : MVT::vector_valuetypes()) { | for (MVT InnerVT : MVT::fixedlen_vector_valuetypes()) { | ||||
setTruncStoreAction(VT, InnerVT, Expand); | setTruncStoreAction(VT, InnerVT, Expand); | ||||
setLoadExtAction(ISD::SEXTLOAD, VT, InnerVT, Expand); | setLoadExtAction(ISD::SEXTLOAD, VT, InnerVT, Expand); | ||||
setLoadExtAction(ISD::ZEXTLOAD, VT, InnerVT, Expand); | setLoadExtAction(ISD::ZEXTLOAD, VT, InnerVT, Expand); | ||||
setLoadExtAction(ISD::EXTLOAD, VT, InnerVT, Expand); | setLoadExtAction(ISD::EXTLOAD, VT, InnerVT, Expand); | ||||
} | } | ||||
if (isTypeLegal(VT)) { | if (isTypeLegal(VT)) { | ||||
// These operations are legal for anything that can be stored in a | // These operations are legal for anything that can be stored in a | ||||
Show All 9 Lines | if (isTypeLegal(VT)) { | ||||
// Likewise, except that we need to replace the nodes with something | // Likewise, except that we need to replace the nodes with something | ||||
// more specific. | // more specific. | ||||
setOperationAction(ISD::BUILD_VECTOR, VT, Custom); | setOperationAction(ISD::BUILD_VECTOR, VT, Custom); | ||||
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom); | setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom); | ||||
} | } | ||||
} | } | ||||
// Handle integer vector types. | // Handle integer vector types. | ||||
for (MVT VT : MVT::integer_vector_valuetypes()) { | for (MVT VT : MVT::integer_fixedlen_vector_valuetypes()) { | ||||
if (isTypeLegal(VT)) { | if (isTypeLegal(VT)) { | ||||
// These operations have direct equivalents. | // These operations have direct equivalents. | ||||
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Legal); | setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Legal); | ||||
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Legal); | setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Legal); | ||||
setOperationAction(ISD::ADD, VT, Legal); | setOperationAction(ISD::ADD, VT, Legal); | ||||
setOperationAction(ISD::SUB, VT, Legal); | setOperationAction(ISD::SUB, VT, Legal); | ||||
if (VT != MVT::v2i64) | if (VT != MVT::v2i64) | ||||
setOperationAction(ISD::MUL, VT, Legal); | setOperationAction(ISD::MUL, VT, Legal); | ||||
▲ Show 20 Lines • Show All 7,440 Lines • Show Last 20 Lines |