From 90b782559860c4df9c79cb38066adbb4167293f3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 3 Mar 2021 23:25:46 -0800 Subject: [PATCH] [LegalizeVectorTypes] Remove a tautological compare. --- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp index f70406416347..2fca0f386627 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp @@ -1268,7 +1268,7 @@ void DAGTypeLegalizer::SplitVecRes_INSERT_SUBVECTOR(SDNode *N, SDValue &Lo, // vector, and insert into the lower half of the split vector directly. // Similarly if the subvector is fully in the high half. unsigned IdxVal = cast(Idx)->getZExtValue(); - if (IdxVal >= 0 && IdxVal + SubElems <= LoElems) { + if (IdxVal + SubElems <= LoElems) { Lo = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, LoVT, Lo, SubVec, Idx); return; }