[llvm] [X86][AVX] Fix handling of out-of-bounds shift amounts in AVX2 vector shift nodes (PR #84426)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 12 02:04:34 PDT 2024
================
@@ -47334,6 +47334,17 @@ static SDValue combineShiftRightArithmetic(SDNode *N, SelectionDAG &DAG,
if (SDValue V = combineShiftToPMULH(N, DAG, Subtarget))
return V;
+ APInt ShiftAmt;
+ SDNode *UMinNode = N1.getNode();
+ if (supportedVectorVarShift(VT, Subtarget, ISD::SRA) &&
+ UMinNode->getOpcode() == ISD::UMIN &&
+ ISD::isConstantSplatVector(UMinNode->getOperand(1).getNode(), ShiftAmt) &&
----------------
RKSimon wrote:
`ISD::isConstantSplatVector(N1.getOperand(1).getNode(), ShiftAmt)`
https://github.com/llvm/llvm-project/pull/84426
More information about the llvm-commits
mailing list