Skip to content

Commit 5a18c57

Browse files
committed
[RISCV] Don't call CheckAndMask from selectZExti32.
Now that targetShrinkDemandedConstant preserves 0xffffffff masks we shouldn't need to call computeKnownBits here.
1 parent 9be8f8b commit 5a18c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ bool RISCVDAGToDAGISel::selectSExti32(SDValue N, SDValue &Val) {
11281128
bool RISCVDAGToDAGISel::selectZExti32(SDValue N, SDValue &Val) {
11291129
if (N.getOpcode() == ISD::AND) {
11301130
auto *C = dyn_cast<ConstantSDNode>(N.getOperand(1));
1131-
if (C && CheckAndMask(N.getOperand(0), C, UINT64_C(0xFFFFFFFF))) {
1131+
if (C && C->getZExtValue() == UINT64_C(0xFFFFFFFF)) {
11321132
Val = N.getOperand(0);
11331133
return true;
11341134
}

0 commit comments

Comments
 (0)