forked from OSchip/llvm-project
Set operation actions to legal types only.
llvm-svn: 141075
This commit is contained in:
parent
04001625e4
commit
3b309efe38
|
@ -402,6 +402,9 @@ SPUTargetLowering::SPUTargetLowering(SPUTargetMachine &TM)
|
||||||
i <= (unsigned)MVT::LAST_VECTOR_VALUETYPE; ++i) {
|
i <= (unsigned)MVT::LAST_VECTOR_VALUETYPE; ++i) {
|
||||||
MVT::SimpleValueType VT = (MVT::SimpleValueType)i;
|
MVT::SimpleValueType VT = (MVT::SimpleValueType)i;
|
||||||
|
|
||||||
|
// Set operation actions to legal types only.
|
||||||
|
if (!isTypeLegal(VT)) continue;
|
||||||
|
|
||||||
// add/sub are legal for all supported vector VT's.
|
// add/sub are legal for all supported vector VT's.
|
||||||
setOperationAction(ISD::ADD, VT, Legal);
|
setOperationAction(ISD::ADD, VT, Legal);
|
||||||
setOperationAction(ISD::SUB, VT, Legal);
|
setOperationAction(ISD::SUB, VT, Legal);
|
||||||
|
@ -423,14 +426,12 @@ SPUTargetLowering::SPUTargetLowering(SPUTargetMachine &TM)
|
||||||
|
|
||||||
// Custom lower build_vector, constant pool spills, insert and
|
// Custom lower build_vector, constant pool spills, insert and
|
||||||
// extract vector elements:
|
// extract vector elements:
|
||||||
if (isTypeLegal(VT)) {
|
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
|
||||||
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
|
setOperationAction(ISD::ConstantPool, VT, Custom);
|
||||||
setOperationAction(ISD::ConstantPool, VT, Custom);
|
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Custom);
|
||||||
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Custom);
|
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom);
|
||||||
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom);
|
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom);
|
||||||
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom);
|
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
|
||||||
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setOperationAction(ISD::AND, MVT::v16i8, Custom);
|
setOperationAction(ISD::AND, MVT::v16i8, Custom);
|
||||||
|
|
Loading…
Reference in New Issue