[llvm] [AArch64][SVE2] Do not emit RSHRNB for large shifts (PR #66672)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 03:29:54 PDT 2023


================
@@ -20241,6 +20241,9 @@ static SDValue trySimplifySrlAddToRshrnb(SDValue Srl, SelectionDAG &DAG,
     return SDValue();
   unsigned ShiftValue = SrlOp1->getZExtValue();
 
+  if (ShiftValue > ResVT.getScalarSizeInBits())
----------------
paulwalker-arm wrote:

Is there a reason the shift amount cannot be clamped to the maximum rather than not doing the transformation?

https://github.com/llvm/llvm-project/pull/66672


More information about the llvm-commits mailing list