[PATCH] D72958: [InstSimplify] fold select of vector constants that include undef elements
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 18 09:02:29 PST 2020
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4044
+ NewC.push_back(TEltC);
+ }
+ }
----------------
I'm having a bit of a hard time convincing myself that this is always correct. In particular, the relationship between isElementWiseEqual(), which is based on `ConstantExpr::getICmp()` and this code, which is based on simple identity comparison, is not entirely clear. If the vector includes complex constant expressions, and `ConstantExpr::getICmp()` manages to fold that code while the identity comparison fails, this would trigger an assertion failure here. Or is there an invariant that this cannot happen?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72958/new/
https://reviews.llvm.org/D72958
More information about the llvm-commits
mailing list