[PATCH] D115448: [AArch64][SVE] Instcombine SDIV to ASRD
Peter Waller via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 08:06:50 PST 2021
peterwaller-arm added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1025
+static Optional<Instruction *> instCombineSVESplatSDIV(InstCombiner &IC,
+ IntrinsicInst &II) {
----------------
nit. I think the name 'instCombineSVESDiv' would be in keeping with the other functions in this file.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1038
+ return None;
+
+ APInt SplattedAPInt = SplattedConstantInt->getValue();
----------------
nit. Extraneous blank.
================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:1047
+ {II.getOperand(0), II.getOperand(1),
+ ConstantInt::get(SplattedValue->getType(), SplattedAPInt.logBase2())});
+ return IC.replaceInstUsesWith(II, ASRD);
----------------
nit. Suggest extracting the constant as its own variable to make 'CreateIntrinsic' a bit tidier.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115448/new/
https://reviews.llvm.org/D115448
More information about the llvm-commits
mailing list