From: Philip Reames Date: Wed, 14 Jun 2023 19:57:49 +0000 (-0700) Subject: [RISCV] Remove dead code from doPeepholeMaskedRVV [nfc] X-Git-Tag: upstream/17.0.6~5056 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4a3bd7f8b7c587813d0e54d8d2dde7385895d09;p=platform%2Fupstream%2Fllvm.git [RISCV] Remove dead code from doPeepholeMaskedRVV [nfc] This is after lowering of undef to IMPLICIT_DEF, so the condition is always false. Rather than fixing the intent (which was to match implicit_def per the comment), just delete it. We're in the process of migrating away from the TA pseudos, so using _TA more often is fine. --- diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp index ccd0acd..2a001a6 100644 --- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp +++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp @@ -3193,14 +3193,11 @@ bool RISCVDAGToDAGISel::doPeepholeMaskedRVV(SDNode *N) { TailPolicyOpIdx = getVecPolicyOpIdx(N, MaskedMCID); if (!(N->getConstantOperandVal(*TailPolicyOpIdx) & RISCVII::TAIL_AGNOSTIC)) { - // We can't use TA if the tie-operand is not IMPLICIT_DEF - if (!N->getOperand(0).isUndef()) { - // Keep the true-masked instruction when there is no unmasked TU - // instruction - if (I->UnmaskedTUPseudo == I->MaskedPseudo) - return false; - UseTUPseudo = true; - } + // Keep the true-masked instruction when there is no unmasked TU + // instruction + if (I->UnmaskedTUPseudo == I->MaskedPseudo) + return false; + UseTUPseudo = true; } } }