[PATCH] D131544: [LegalizeTypes][NFC] Use dyn_cast instead of isa and cast.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 09:51:24 PDT 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3036
- if (isa<ConstantSDNode>(Idx)) {
- uint64_t IdxVal = cast<ConstantSDNode>(Idx)->getZExtValue();
+ if (auto * Index = dyn_cast<ConstantSDNode>(Idx)) {
+ uint64_t IdxVal = Index->getZExtValue();
----------------
There shouldn't be a space before `Index`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131544/new/
https://reviews.llvm.org/D131544
More information about the llvm-commits
mailing list