[Legalizer] Fix wrong operand in split vector helper
authorQiu Chaofan <qiucofan@cn.ibm.com>
Wed, 8 Jul 2020 15:57:44 +0000 (23:57 +0800)
committerQiu Chaofan <qiucofan@cn.ibm.com>
Thu, 9 Jul 2020 01:57:29 +0000 (09:57 +0800)
This should be a typo introduced in D69275, which may cause an unknown
segment fault in getNode.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D83376

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

index 15d88eb..550174f 100644 (file)
@@ -2610,9 +2610,9 @@ SDValue DAGTypeLegalizer::SplitVecOp_TruncateHelper(SDNode *N) {
   SDValue Chain;
   if (N->isStrictFPOpcode()) {
     HalfLo = DAG.getNode(N->getOpcode(), DL, {HalfVT, MVT::Other},
-                         {N->getOperand(0), HalfLo});
+                         {N->getOperand(0), InLoVec});
     HalfHi = DAG.getNode(N->getOpcode(), DL, {HalfVT, MVT::Other},
-                         {N->getOperand(0), HalfHi});
+                         {N->getOperand(0), InHiVec});
     // Legalize the chain result - switch anything that used the old chain to
     // use the new one.
     Chain = DAG.getNode(ISD::TokenFactor, DL, MVT::Other, HalfLo.getValue(1),