@@ -2549,7 +2549,7 @@ static Instruction *foldCastShuffle(ShuffleVectorInst &Shuf,
2549
2549
// / Try to fold an extract subvector operation.
2550
2550
static Instruction *foldIdentityExtractShuffle (ShuffleVectorInst &Shuf) {
2551
2551
Value *Op0 = Shuf.getOperand (0 ), *Op1 = Shuf.getOperand (1 );
2552
- if (!Shuf.isIdentityWithExtract () || !match (Op1, m_Undef ()))
2552
+ if (!Shuf.isIdentityWithExtract () || !match (Op1, m_Poison ()))
2553
2553
return nullptr ;
2554
2554
2555
2555
// Check if we are extracting all bits of an inserted scalar:
@@ -2578,10 +2578,10 @@ static Instruction *foldIdentityExtractShuffle(ShuffleVectorInst &Shuf) {
2578
2578
// not allow arbitrary shuffle mask creation as a target-independent transform
2579
2579
// (because we can't guarantee that will lower efficiently).
2580
2580
//
2581
- // If the extracting shuffle has an undef mask element, it transfers to the
2581
+ // If the extracting shuffle has an poison mask element, it transfers to the
2582
2582
// new shuffle mask. Otherwise, copy the original mask element. Example:
2583
- // shuf (shuf X, Y, <C0, C1, C2, undef , C4>), undef , <0, undef , 2, 3> -->
2584
- // shuf X, Y, <C0, undef , C2, undef >
2583
+ // shuf (shuf X, Y, <C0, C1, C2, poison , C4>), poison , <0, poison , 2, 3> -->
2584
+ // shuf X, Y, <C0, poison , C2, poison >
2585
2585
unsigned NumElts = cast<FixedVectorType>(Shuf.getType ())->getNumElements ();
2586
2586
SmallVector<int , 16 > NewMask (NumElts);
2587
2587
assert (NumElts < Mask.size () &&
0 commit comments