[PATCH] D72467: [WIP] Remove "mask" operand from shufflevector.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 17:02:36 PST 2020
efriedma marked an inline comment as done.
efriedma added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4413
unsigned MaxRecurse) {
- if (isa<UndefValue>(Mask))
+ if (all_of(Mask, [](int Elem) { return Elem == -1; }))
return UndefValue::get(RetTy);
----------------
xbolva00 wrote:
> maybe introduce new helper function to check if mask is "undef"?
I could introduce ShuffleVectorInst::MaskIsAllUndef and ShuffleVectorInst::MaskIsAllZero, I guess. Not sure how helpful that actually is for a predicate that can be expressed on one line anyway.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72467/new/
https://reviews.llvm.org/D72467
More information about the llvm-commits
mailing list