[PATCH] D24279: [InstCombine] canonicalize vector select with constant vector condition to shuffle
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 6 15:49:52 PDT 2016
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineSelect.cpp:968
@@ +967,3 @@
+ for (unsigned int i = 0; i != NumElts; ++i) {
+ Constant *Elt = CondC->getAggregateElement(i);
+ if (Elt->isOneValue()) {
----------------
majnemer wrote:
> Can't this return null?
Argh...yes. Let me concoct some tests from the last time I forgot about constant expressions. :)
https://reviews.llvm.org/D24279
More information about the llvm-commits
mailing list