[PATCH] D125233: [AArch64][SVE] Convert SRSHL to LSL when the fed from an ABS intrinsic
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 06:15:53 PDT 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1262-1265
+ Value *SplatValue = getSplatValue(Shift);
+ ConstantInt *SplatConstantInt = dyn_cast_or_null<ConstantInt>(SplatValue);
+ if (!SplatConstantInt || SplatConstantInt->getSExtValue() < 0)
+ return None;
----------------
I don't suppose `m_NonNegative()` works, or can be made to work, here?
Ideally I'd hope for something similar in the higher up code paths so that perhaps we can catch more cases for free but I think realistically this is the only place where it might work today out-the-box.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125233/new/
https://reviews.llvm.org/D125233
More information about the llvm-commits
mailing list