[PATCH] D71014: [AArc64][SVE] Fold constant multiply of element count
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 06:45:02 PST 2019
c-rhodes marked 2 inline comments as done.
c-rhodes added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp:167
+
+ int64_t MulImm = cast<ConstantSDNode>(N)->getSExtValue();
+ if ((MulImm % std::abs(Scale)) == 0) {
----------------
sdesmalen wrote:
> nit: this is perhaps personal preference, but I always prefer code like this being in the form:
> ```
> if (invalidating condition)
> return false;
> if (invalidating condition2)
> return false;
> :
> return true;```
>
Done for the check `Scale` is a factor of imm. I've left the low/high range checks as I think it's more readable as it is.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71014/new/
https://reviews.llvm.org/D71014
More information about the llvm-commits
mailing list