[PATCH] D77261: Clean up usages of asserting vector getters in Type

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 09:12:05 PDT 2020


sdesmalen added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2633
     for (unsigned i = 0; i < I.getNumOperands(); i++)
       if (I.getOperand(i)->getType()->isVectorTy()) {
+        assert(
----------------
If you change this to
```if (auto *VTy = dyn_cast<VectorType>(I.getOperand(i)->getType()) {```
you don't need the regular casts below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77261/new/

https://reviews.llvm.org/D77261





More information about the llvm-commits mailing list