[PATCH] D158724: [AArch64][LoopVectorize] Add truncated store values to list of types for widening
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 08:37:57 PDT 2023
david-arm added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5729
T = ST->getValueOperand()->getType();
+ if (isa<TruncInst>(ST->getOperand(0))) {
+ auto *castTrunc = dyn_cast<CastInst>(ST->getOperand(0));
----------------
david-arm wrote:
> I think you can write this more simply as
>
> ```if (auto *Trunc = dyn_cast<TruncInst>(ST->getOperand(0)))
> T = Trunc->getSrcTy();
> ```
nit: Sorry @Rin, just one more thing. Perhaps for consistency it makes sense to also use `ST->getValueOperand()` even though it's the same thing?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158724/new/
https://reviews.llvm.org/D158724
More information about the llvm-commits
mailing list