x86 doesn't actually want to custom lower v3i32
authorNate Begeman <natebegeman@mac.com>
Tue, 11 Dec 2007 01:41:33 +0000 (01:41 +0000)
committerNate Begeman <natebegeman@mac.com>
Tue, 11 Dec 2007 01:41:33 +0000 (01:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44835 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelLowering.cpp

index c0001c0f974f3fa6c275dd7216ca73433663c061..5835ae33aeef84b968b0a68baf59ca01155934f0 100644 (file)
@@ -600,6 +600,9 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
 
     // Custom lower build_vector, vector_shuffle, and extract_vector_elt.
     for (unsigned VT = (unsigned)MVT::v16i8; VT != (unsigned)MVT::v2i64; VT++) {
+      // Do not attempt to custom lower non-power-of-2 vectors
+      if (!isPowerOf2_32(MVT::getVectorNumElements(VT)))
+        continue;
       setOperationAction(ISD::BUILD_VECTOR,        (MVT::ValueType)VT, Custom);
       setOperationAction(ISD::VECTOR_SHUFFLE,      (MVT::ValueType)VT, Custom);
       setOperationAction(ISD::EXTRACT_VECTOR_ELT,  (MVT::ValueType)VT, Custom);