Skip to content

Commit c14602b

Browse files
committed
[RISCV] Add PseudoCCADDIW/SLLW/SRLW/SRAW/SLLIW/SRLIW/SRAIW to RISCVOptWInstrs.
These can be treated simlarly to PseudoCCADDW/SUBW.
1 parent d3876c5 commit c14602b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

llvm/lib/Target/RISCV/RISCVOptWInstrs.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,16 @@ static bool isSignExtendedW(Register SrcReg, const RISCVSubtarget &ST,
482482

483483
break;
484484
case RISCV::PseudoCCADDW:
485+
case RISCV::PseudoCCADDIW:
485486
case RISCV::PseudoCCSUBW:
486-
// Returns operand 4 or an ADDW/SUBW of operands 5 and 6. We only need to
487-
// check if operand 4 is sign extended.
487+
case RISCV::PseudoCCSLLW:
488+
case RISCV::PseudoCCSRLW:
489+
case RISCV::PseudoCCSRAW:
490+
case RISCV::PseudoCCSLLIW:
491+
case RISCV::PseudoCCSRLIW:
492+
case RISCV::PseudoCCSRAIW:
493+
// Returns operand 4 or an ADDW/SUBW/etc. of operands 5 and 6. We only
494+
// need to check if operand 4 is sign extended.
488495
if (!AddRegDefToWorkList(MI->getOperand(4).getReg()))
489496
return false;
490497
break;

0 commit comments

Comments
 (0)