File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -719,15 +719,13 @@ bool RISCVVectorPeephole::foldVMergeToMask(MachineInstr &MI) const {
719719
720720 // We require that either passthru and false are the same, or that passthru
721721 // is undefined.
722- if (PassthruReg != RISCV::NoRegister &&
723- !isKnownSameDefs (PassthruReg, FalseReg))
722+ if (PassthruReg && !isKnownSameDefs (PassthruReg, FalseReg))
724723 return false ;
725724
726725 // If True has a passthru operand then it needs to be the same as vmerge's
727726 // False, since False will be used for the result's passthru operand.
728727 Register TruePassthru = True.getOperand (True.getNumExplicitDefs ()).getReg ();
729- if (RISCVII::isFirstDefTiedToFirstUse (True.getDesc ()) &&
730- TruePassthru != RISCV::NoRegister &&
728+ if (RISCVII::isFirstDefTiedToFirstUse (True.getDesc ()) && TruePassthru &&
731729 !isKnownSameDefs (TruePassthru, FalseReg))
732730 return false ;
733731
@@ -764,7 +762,7 @@ bool RISCVVectorPeephole::foldVMergeToMask(MachineInstr &MI) const {
764762 // to the tail. In that case we always need to use tail undisturbed to
765763 // preserve them.
766764 uint64_t Policy = RISCVVType::TAIL_UNDISTURBED_MASK_UNDISTURBED;
767- if (PassthruReg == RISCV::NoRegister && RISCV::isVLKnownLE (VMergeVL, MinVL))
765+ if (! PassthruReg && RISCV::isVLKnownLE (VMergeVL, MinVL))
768766 Policy |= RISCVVType::TAIL_AGNOSTIC;
769767
770768 assert (RISCVII::hasVecPolicyOp (True.getDesc ().TSFlags ) &&
You can’t perform that action at this time.
0 commit comments