[SDAG] Make the new zext-vector-inreg node default to expand so targets
authorChandler Carruth <chandlerc@gmail.com>
Wed, 9 Jul 2014 22:53:04 +0000 (22:53 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 9 Jul 2014 22:53:04 +0000 (22:53 +0000)
don't need to set it manually.

This is based on feedback from Tom who pointed out that if every target
needs to handle this we need to reach out to those maintainers. In fact,
it doesn't make sense to duplicate everything when anything other than
expand seems unlikely at this stage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212661 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/TargetLoweringBase.cpp
lib/Target/X86/X86ISelLowering.cpp

index cc4445fc4c021956ff5467a036df606b9fc3dd71..71c609441bb6b9c4fd36faaebbe9ac98b7563b64 100644 (file)
@@ -743,8 +743,11 @@ void TargetLoweringBase::initActions() {
 
     // These operations default to expand for vector types.
     if (VT >= MVT::FIRST_VECTOR_VALUETYPE &&
-        VT <= MVT::LAST_VECTOR_VALUETYPE)
+        VT <= MVT::LAST_VECTOR_VALUETYPE) {
       setOperationAction(ISD::FCOPYSIGN, (MVT::SimpleValueType)VT, Expand);
+      setOperationAction(ISD::ZERO_EXTEND_VECTOR_INREG,
+                         (MVT::SimpleValueType)VT, Expand);
+    }
   }
 
   // Most targets ignore the @llvm.prefetch intrinsic.
index 5f72d5004fd10eb75d9bbe2022fc7dfcdd79e8bc..67d2f8e75ed78d031265186aba65abe1b3cfd941 100644 (file)
@@ -869,7 +869,6 @@ void X86TargetLowering::resetOperationActions() {
     setOperationAction(ISD::TRUNCATE, VT, Expand);
     setOperationAction(ISD::SIGN_EXTEND, VT, Expand);
     setOperationAction(ISD::ZERO_EXTEND, VT, Expand);
-    setOperationAction(ISD::ZERO_EXTEND_VECTOR_INREG, VT, Expand);
     setOperationAction(ISD::ANY_EXTEND, VT, Expand);
     setOperationAction(ISD::VSELECT, VT, Expand);
     setOperationAction(ISD::SELECT_CC, VT, Expand);