summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-10-04 10:03:32 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-10-04 10:03:32 +0000
commit04001625e4def74456888a2a20753ad6db1ccbc1 (patch)
tree6fd0945e542f7ad9bd5e117d79541ffb8b9a2c09 /llvm/lib/Target/CellSPU/SPUISelLowering.cpp
parent1a98ab4fc34ab6b759282d873eb4d5481b6b58cc (diff)
downloadbcm5719-llvm-04001625e4def74456888a2a20753ad6db1ccbc1.tar.gz
bcm5719-llvm-04001625e4def74456888a2a20753ad6db1ccbc1.zip
Operations should be custom lowered only if their type is legal.
Test: CellSPU/v2i32.ll when running with -promote-elements llvm-svn: 141074
Diffstat (limited to 'llvm/lib/Target/CellSPU/SPUISelLowering.cpp')
-rw-r--r--llvm/lib/Target/CellSPU/SPUISelLowering.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
index cfd29cf90dd..03bfb4ee71e 100644
--- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
+++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp
@@ -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);
OpenPOWER on IntegriCloud