Skip to content

Commit

Permalink
for completeness, allow undef also.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112351 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
lattner committed Aug 28, 2010
1 parent b188a37 commit 157d4ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Transforms/InstCombine/InstCombineCasts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,9 @@ static unsigned getTypeSizeIndex(unsigned Value, const Type *Ty) {
static bool CollectInsertionElements(Value *V, unsigned ElementIndex,
SmallVectorImpl<Value*> &Elements,
const Type *VecEltTy) {
// Undef values never contribute useful bits to the result.
if (isa<UndefValue>(V)) return true;

// If we got down to a value of the right type, we win, try inserting into the
// right element.
if (V->getType() == VecEltTy) {
Expand Down

0 comments on commit 157d4ea

Please sign in to comment.