[PATCH] D93013: [RISCV] Define vadd intrinsics and lower to V instructions.
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 10 10:03:36 PST 2020
jrtc27 added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td:26
+
+ if (auto *C = dyn_cast<ConstantSDNode>(N)) {
+ if (C->isNullValue()) {
----------------
craig.topper wrote:
> This can be simplified slightly to
>
> ```
> auto *C = dyn_cast<ConstantSDNode(N);
> if (C && C->isNullValue()
> ```
>
> Then you don't need two levels of indentation
I forget whether C++17 is allowed; if so you can do
```
if (auto *C = dyn_cast<ConstantSDNode>(N); C->isNullValue())
```
to get the benefits both of reduced scope and of reduced indentation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93013/new/
https://reviews.llvm.org/D93013
More information about the llvm-commits
mailing list