[PATCH] D31189: [InstCombine] Fix folding of select into phi nodes when incoming element of phi is a vector type

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 16:53:55 PDT 2017


sanjoy added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:914
+      // of individual elements in the vector (and will always return false).
+      if (InC && !isa<ConstantExpr>(InC) && !isa<VectorType>(InC->getType()))
         InV = InC->isNullValue() ? FalseVInPred : TrueVInPred;
----------------
How about `ConstantArray` and `ConstantStruct`?


https://reviews.llvm.org/D31189





More information about the llvm-commits mailing list