[llvm] [X86][AVX] Fix handling of out-of-bounds shift amounts in AVX2 vector logical shift nodes #83840 (PR #86922)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 09:50:55 PDT 2024
================
@@ -45612,6 +45612,30 @@ static SDValue combineSelect(SDNode *N, SelectionDAG &DAG,
}
}
+ // Exploits AVX2 VSHLV/VSRLV instructions for efficient unsigned vector shifts
+ // with out-of-bounds clamping.
+
+ // Unlike general shift instructions (SHL/SRL), AVX2's VSHLV/VSRLV handle
+ // shift amounts exceeding the element bitwidth. VSHLV clamps the amount to
----------------
RKSimon wrote:
Merge the near identical VSHLV+VSRLV sentences - "VSHLV/VSRLV clamps the amount to...."
https://github.com/llvm/llvm-project/pull/86922
More information about the llvm-commits
mailing list