Skip to content

Commit bd4ff65

Browse files
committed
Revert "[LoongArch] Eliminate the redundant sign extension of division (llvm#107971)"
This reverts commit d752f29.
1 parent bdae3c4 commit bd4ff65

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

llvm/lib/Target/LoongArch/LoongArchOptWInstrs.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -637,19 +637,6 @@ static bool isSignExtendedW(Register SrcReg, const LoongArchSubtarget &ST,
637637
break;
638638
}
639639
return false;
640-
// If all incoming values are sign-extended and all users only use
641-
// the lower 32 bits, then convert them to W versions.
642-
case LoongArch::DIV_D: {
643-
if (!AddRegToWorkList(MI->getOperand(1).getReg()))
644-
return false;
645-
if (!AddRegToWorkList(MI->getOperand(2).getReg()))
646-
return false;
647-
if (hasAllWUsers(*MI, ST, MRI)) {
648-
FixableDef.insert(MI);
649-
break;
650-
}
651-
return false;
652-
}
653640
}
654641
}
655642

@@ -664,8 +651,6 @@ static unsigned getWOp(unsigned Opcode) {
664651
return LoongArch::ADDI_W;
665652
case LoongArch::ADD_D:
666653
return LoongArch::ADD_W;
667-
case LoongArch::DIV_D:
668-
return LoongArch::DIV_W;
669654
case LoongArch::LD_D:
670655
case LoongArch::LD_WU:
671656
return LoongArch::LD_W;

0 commit comments

Comments
 (0)