[PATCH] D71014: [AArc64][SVE] Fold constant multiply of element count
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 05:34:54 PST 2019
sdesmalen 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) {
----------------
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;```
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:9437
+ return true;
+ }
+ return false;
----------------
this is missing a `default` case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71014/new/
https://reviews.llvm.org/D71014
More information about the llvm-commits
mailing list