[llvm] [AArch64][SVE2] Do not emit RSHRNB for large shifts (PR #66672)
Matthew Devereau via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 20 05:07:54 PDT 2023
================
@@ -20241,6 +20241,9 @@ static SDValue trySimplifySrlAddToRshrnb(SDValue Srl, SelectionDAG &DAG,
return SDValue();
unsigned ShiftValue = SrlOp1->getZExtValue();
+ if (ShiftValue > ResVT.getScalarSizeInBits())
----------------
MDevereau wrote:
@paulwalker-arm I was trying to think of a case but since the add is check for single use and the top half of the elements get narrowed I think this it's safe to clamp it to the maximum value.
https://github.com/llvm/llvm-project/pull/66672
More information about the llvm-commits
mailing list