Skip to content

Commit cd1d344

Browse files
committed
[RISCV] Don't check haveNoCommonBitsSet in RISCVGatherScatterLowering
If an or instruction has no common bits set in its operands, InstCombine will set the disjoint flag. This means we shouldn't need to compute it ourselves anymore in RISCVGatherScatterLowering, and can just rely on said flag being set. Originally split out from #77800
1 parent 3b7abf3 commit cd1d344

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ bool RISCVGatherScatterLowering::matchStridedRecurrence(Value *Index, Loop *L,
250250
return false;
251251
case Instruction::Or:
252252
// We need to be able to treat Or as Add.
253-
if (!haveNoCommonBitsSet(BO->getOperand(0), BO->getOperand(1), *DL) &&
254-
!cast<PossiblyDisjointInst>(BO)->isDisjoint())
253+
if (!cast<PossiblyDisjointInst>(BO)->isDisjoint())
255254
return false;
256255
break;
257256
case Instruction::Add:

0 commit comments

Comments
 (0)