[PATCH] D80885: [VectorCombine] scalarizeBinop - support an all-constant src vector operand
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 05:24:46 PDT 2020
lebedev.ri added a comment.
I'm having a hard time following `scalarizeBinop()` now.
Perhaps it can be refactored somehow?
At the very least i'd suggest `bool LhsIsConst = !V0` and so on.
================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:385
+ if (!V0) {
+ V0 = Builder.CreateExtractElement(VecC0, Index);
+ if (!isa_and_nonnull<Constant>(V0))
----------------
`ConstantExpr::getExtractElement()` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80885/new/
https://reviews.llvm.org/D80885
More information about the llvm-commits
mailing list