1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[X86][SSE] combineShuffleWithHorizOp - avoid unnecessary subtraction. NFCI.

We can safely replace ((M - NumElts) % NumEltsPerLane) with (M % NumEltsPerLane) as the modulo result will be the same.
This commit is contained in:
Simon Pilgrim 2020-08-11 16:42:37 +01:00
parent 3333ddf27a
commit 16e7bf9043

View File

@ -35900,7 +35900,7 @@ static SDValue combineShuffleWithHorizOp(SDValue N, MVT VT, const SDLoc &DL,
(M % NumEltsPerLane) >= NumHalfEltsPerLane)
M -= NumHalfEltsPerLane;
if (NumElts <= M && BC1.getOperand(0) == BC1.getOperand(1) &&
((M - NumElts) % NumEltsPerLane) >= NumHalfEltsPerLane)
(M % NumEltsPerLane) >= NumHalfEltsPerLane)
M -= NumHalfEltsPerLane;
}
}