[llvm] [X86][AVX] Fix handling of out-of-bounds shift amounts in AVX2 vector logical shift nodes #83840 (PR #86922)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 03:07:34 PDT 2024
================
@@ -47384,6 +47408,24 @@ static SDValue combineShiftLeft(SDNode *N, SelectionDAG &DAG) {
ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
EVT VT = N0.getValueType();
+ // Exploits AVX2 VSHLV/VSRLV instructions for efficient unsigned vector shifts
+ // with out-of-bounds clamping.
+ if (N0.getOpcode() == ISD::VSELECT &&
+ supportedVectorVarShift(VT, DAG.getSubtarget<X86Subtarget>(), ISD::SHL)) {
----------------
SahilPatidar wrote:
done
https://github.com/llvm/llvm-project/pull/86922
More information about the llvm-commits
mailing list