diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index a15042f1a0ee..07cd10d6d22d 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -1215,8 +1215,8 @@ static Instruction *foldInsEltIntoSplat(InsertElementInst &InsElt) { // Replace the shuffle mask element at the index of this insert with a zero. // For example: - // inselt (shuf (inselt undef, X, 0), undef, <0,undef,0,undef>), X, 1 - // --> shuf (inselt undef, X, 0), undef, <0,0,0,undef> + // inselt (shuf (inselt undef, X, 0), _, <0,undef,0,undef>), X, 1 + // --> shuf (inselt undef, X, 0), poison, <0,0,0,undef> unsigned NumMaskElts = cast(Shuf->getType())->getNumElements(); SmallVector NewMask(NumMaskElts); @@ -1973,8 +1973,8 @@ static Instruction *canonicalizeInsertSplat(ShuffleVectorInst &Shuf, // Splat from element 0. Any mask element that is undefined remains undefined. // For example: - // shuf (inselt undef, X, 2), undef, <2,2,undef> - // --> shuf (inselt undef, X, 0), undef, <0,0,undef> + // shuf (inselt undef, X, 2), _, <2,2,undef> + // --> shuf (inselt undef, X, 0), poison, <0,0,undef> unsigned NumMaskElts = cast(Shuf.getType())->getNumElements(); SmallVector NewMask(NumMaskElts, 0);