[PATCH] D51433: [InstCombine] enhance vector demanded elements to look at a vector select condition operand
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 6 02:49:56 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1267
+ if (Value *V = SimplifyDemandedVectorElts(I->getOperand(0), DemandedElts,
+ UndefElts, Depth + 1)) {
+ I->setOperand(0, V);
----------------
Won't using UndefElts interfere with the Left/Right cases below?
================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:1275
APInt LeftDemanded(DemandedElts), RightDemanded(DemandedElts);
- if (ConstantVector* CV = dyn_cast<ConstantVector>(I->getOperand(0))) {
+ if (auto *CV = dyn_cast<ConstantVector>(I->getOperand(0))) {
for (unsigned i = 0; i < VWidth; i++) {
----------------
Separate NFC change
https://reviews.llvm.org/D51433
More information about the llvm-commits
mailing list