[llvm-commits] [llvm] r141074 - /llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
Nadav Rotem
nadav.rotem at intel.com
Tue Oct 4 03:03:32 PDT 2011
Author: nadav
Date: Tue Oct 4 05:03:32 2011
New Revision: 141074
URL: http://llvm.org/viewvc/llvm-project?rev=141074&view=rev
Log:
Operations should be custom lowered only if their type is legal.
Test: CellSPU/v2i32.ll when running with -promote-elements
Modified:
llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=141074&r1=141073&r2=141074&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Tue Oct 4 05:03:32 2011
@@ -423,12 +423,14 @@
// 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);
More information about the llvm-commits
mailing list