Skip to content

Commit 0e58c5b

Browse files
committed
[RISCV][NFC] Refactor with the new m_ExactSr
1 parent d8aafb4 commit 0e58c5b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16802,9 +16802,7 @@ static SDValue expandMulToAddOrSubOfShl(SDNode *N, SelectionDAG &DAG,
1680216802
// because X is exact (Y >> M + 2).
1680316803
uint64_t ShAmt = Log2_64(MulAmtLowBit) + 2;
1680416804
using namespace SDPatternMatch;
16805-
return sd_match(X, m_AnyOf(m_Sra(m_Value(), m_SpecificInt(ShAmt)),
16806-
m_Srl(m_Value(), m_SpecificInt(ShAmt)))) &&
16807-
X->getFlags().hasExact();
16805+
return sd_match(X, m_ExactSr(m_Value(), m_SpecificInt(ShAmt)));
1680816806
};
1680916807
if (isPowerOf2_64(MulAmt - MulAmtLowBit) && !(CanSub && PreferSub())) {
1681016808
Op = ISD::ADD;

0 commit comments

Comments
 (0)