[PATCH] D82961: [Scalarizer] Variable insert handling (PR46524)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 11:51:53 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/Scalarizer.cpp:759
+ if (isa<Constant>(InsIdx))
+ return false;
+
----------------
bjope wrote:
> jdoerfert wrote:
> > I do not understand why we skip constant indices.
> I don't know exactly, but Scalarizer is sometimes creating such instructions itself when a vector still is needed.
>
> (Downstream we have hacked the scalarizer to keep vector load/stores (typically loading/storing to a register pair/quad). But artithmetics etc needs to be scalarized. So there are typically lots of insertelement/extractelement instructions around to glue things together after running the scalarizer.)
I mean, why shouldn't we skip them.
I'm not sure replacing constant extract with n constant extracts+select is better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82961/new/
https://reviews.llvm.org/D82961
More information about the llvm-commits
mailing list