[PATCH] D81013: [InstCombine] move vector select ahead of select-shuffle
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 13:51:11 PDT 2020
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2416-2417
+ !is_contained(Mask, UndefMaskElem) &&
+ ShuffleVectorInst::isSelectMask(Mask)) {
+ if (X == FVal) {
+ // select Cond, (shuf_sel X, Y), X --> shuf_sel X, (select Cond, Y, X)
----------------
The problem is that we call `ShuffleVectorInst::isSelectMask()` before we ensure that select and shuffle have common operand, so by now types of their ops might be non-matching, and shuffle is lenght-changing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81013/new/
https://reviews.llvm.org/D81013
More information about the llvm-commits
mailing list