[X86] Simplify the AVX512 code in LowerTruncate a little.
We don't need to create an ISD::TRUNCATE node to return, we started with one and can return it. Also remove the call to getExtendInVec, the result is just going to be a getNode of that value passed in. llvm-svn: 327914
This commit is contained in:
		
							parent
							
								
									ba9355b373
								
							
						
					
					
						commit
						ab6076514d
					
				| 
						 | 
				
			
			@ -16976,10 +16976,9 @@ SDValue X86TargetLowering::LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const {
 | 
			
		|||
      // Make sure we're allowed to promote 512-bits.
 | 
			
		||||
      if (Subtarget.canExtendTo512DQ())
 | 
			
		||||
        return DAG.getNode(ISD::TRUNCATE, DL, VT,
 | 
			
		||||
                           getExtendInVec(X86ISD::VSEXT, DL, MVT::v16i32, In,
 | 
			
		||||
                                          DAG));
 | 
			
		||||
                           DAG.getNode(X86ISD::VSEXT, DL, MVT::v16i32, In));
 | 
			
		||||
    } else {
 | 
			
		||||
      return DAG.getNode(ISD::TRUNCATE, DL, VT, In);
 | 
			
		||||
      return Op;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue