diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 8671efcfd2fb1..ddaaafe3346bc 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -14117,7 +14117,7 @@ SDValue DAGCombiner::visitSIGN_EXTEND(SDNode *N) { } // If the trunc wasn't legal, try to fold to (sext_inreg (anyext x)) - if ((!LegalTypes || TLI.isTypeLegal(VT)) && N0.hasOneUse()) { + if (!LegalTypes || TLI.isTypeLegal(VT)) { SDValue ExtSrc = DAG.getAnyExtOrTrunc(N00, DL, VT); return DAG.getNode(ISD::SIGN_EXTEND_INREG, DL, VT, ExtSrc, N0->getOperand(1));