[PATCH] D131146: [RS4GC] Handle vectors of pointers in non-live clobbering
Danila Malyutin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 16 07:50:34 PDT 2022
danilaml marked an inline comment as done.
danilaml added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:2086-2090
+ Constant *CPN;
+ if (PT->isVectorTy())
+ CPN = ConstantAggregateZero::get(PT);
+ else
+ CPN = ConstantPointerNull::get(cast<PointerType>(PT));
----------------
apilipenko wrote:
>
Ternary operator is not able to implicitly cast `ConstantAggregateZero` and `ConstantPointerNull` to the common base type `Constant`, so this version would need explicit `static_cast`s at which point I feel like the `if` wins out in terseness/readability.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131146/new/
https://reviews.llvm.org/D131146
More information about the llvm-commits
mailing list