[llvm] [SelectionDAG] Move VSelect sign pattern check from AArch64 to general SelectionDAG (PR #151840)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 02:52:48 PDT 2026
================
@@ -13957,8 +13957,13 @@ static SDValue combineVSelectWithAllOnesOrZeros(SDValue Cond, SDValue TVal,
ISD::isConstantSplatVector(TVal.getNode(), TValAPInt) &&
TValAPInt.isOne() &&
ISD::isConstantSplatVectorAllOnes(Cond.getOperand(1).getNode()) &&
- ISD::isConstantSplatVectorAllOnes(FVal.getNode())) {
- return SDValue();
+ ISD::isConstantSplatVectorAllOnes(FVal.getNode()) &&
+ !TLI.shouldAvoidTransformToShift(VT, VT.getScalarSizeInBits() - 1)) {
----------------
arsenm wrote:
This is one of those terrible TLI hooks that don't really make any sense, but I see it's preexisting
https://github.com/llvm/llvm-project/pull/151840
More information about the llvm-commits
mailing list