1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Operations should be custom lowered only if their type is legal.

Test: CellSPU/v2i32.ll when running with -promote-elements
llvm-svn: 141074
This commit is contained in:
Nadav Rotem 2011-10-04 10:03:32 +00:00
parent 6833d72fc0
commit c4ed7cd5f2

View File

@ -423,12 +423,14 @@ SPUTargetLowering::SPUTargetLowering(SPUTargetMachine &TM)
// Custom lower build_vector, constant pool spills, insert and
// extract vector elements:
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
setOperationAction(ISD::ConstantPool, VT, Custom);
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Custom);
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom);
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom);
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
if (isTypeLegal(VT)) {
setOperationAction(ISD::BUILD_VECTOR, VT, Custom);
setOperationAction(ISD::ConstantPool, VT, Custom);
setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Custom);
setOperationAction(ISD::EXTRACT_VECTOR_ELT, VT, Custom);
setOperationAction(ISD::INSERT_VECTOR_ELT, VT, Custom);
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
}
}
setOperationAction(ISD::AND, MVT::v16i8, Custom);