summaryrefslogtreecommitdiff
path: root/lib
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
commite8783096d2d7778e02b19794c01212724c167689 (patch)
tree73d0117cd27611f57b62f0d5d64deb6afed5ad7e /lib
parente97728ecf8a0ee69562cc0e7880cfaa65200c624 (diff)
downloadllvm-e8783096d2d7778e02b19794c01212724c167689.tar.gz
llvm-e8783096d2d7778e02b19794c01212724c167689.tar.bz2
llvm-e8783096d2d7778e02b19794c01212724c167689.tar.xz
Operations should be custom lowered only if their type is legal.
Test: CellSPU/v2i32.ll when running with -promote-elements git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/CellSPU/SPUISelLowering.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/Target/CellSPU/SPUISelLowering.cpp b/lib/Target/CellSPU/SPUISelLowering.cpp
index cfd29cf90d..03bfb4ee71 100644
--- a/lib/Target/CellSPU/SPUISelLowering.cpp
+++ b/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);