[llvm] 4254ed5 - [Legalizer] Fix wrong operand in split vector helper

Qiu Chaofan via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 19:01:10 PDT 2020


Author: Qiu Chaofan
Date: 2020-07-09T09:57:29+08:00
New Revision: 4254ed5c325c4a366a5f763487822414df6a0de4

URL: https://github.com/llvm/llvm-project/commit/4254ed5c325c4a366a5f763487822414df6a0de4
DIFF: https://github.com/llvm/llvm-project/commit/4254ed5c325c4a366a5f763487822414df6a0de4.diff

LOG: [Legalizer] Fix wrong operand in split vector helper

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

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
index 15d88eb5811f..550174f0df72 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -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),


        


More information about the llvm-commits mailing list