[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:
Craig Topper 2018-03-19 21:58:02 +00:00
parent ba9355b373
commit ab6076514d
1 changed files with 2 additions and 3 deletions

View File

@ -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;
}
}