Skip to content

Commit ed81db5

Browse files
nikicAlexisPerry
authored andcommitted
[VectorBuilderTest] Use poison instead of undef for dummy values (NFC)
1 parent f8a6ba8 commit ed81db5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/unittests/IR/VectorBuilderTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions) {
6565
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
6666
bool IsFP = (#INSTCLASS)[0] == 'F'; \
6767
auto *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
68-
Value *Op = UndefValue::get(ValueTy); \
68+
Value *Op = PoisonValue::get(ValueTy); \
6969
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
7070
{Op, Op}); \
7171
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
@@ -115,7 +115,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions_FixedVector_NoMask) {
115115
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
116116
bool IsFP = (#INSTCLASS)[0] == 'F'; \
117117
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
118-
Value *Op = UndefValue::get(ValueTy); \
118+
Value *Op = PoisonValue::get(ValueTy); \
119119
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
120120
{Op, Op}); \
121121
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
@@ -161,7 +161,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions_FixedVector_NoEVL) {
161161
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
162162
bool IsFP = (#INSTCLASS)[0] == 'F'; \
163163
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
164-
Value *Op = UndefValue::get(ValueTy); \
164+
Value *Op = PoisonValue::get(ValueTy); \
165165
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
166166
{Op, Op}); \
167167
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
@@ -196,7 +196,7 @@ TEST_F(VectorBuilderTest,
196196
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
197197
bool IsFP = (#INSTCLASS)[0] == 'F'; \
198198
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
199-
Value *Op = UndefValue::get(ValueTy); \
199+
Value *Op = PoisonValue::get(ValueTy); \
200200
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
201201
{Op, Op}); \
202202
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
@@ -222,8 +222,8 @@ TEST_F(VectorBuilderTest, TestCreateLoadStore) {
222222
auto *FloatVecTy =
223223
FixedVectorType::get(Type::getFloatTy(Context), VectorNumElements);
224224

225-
Value *FloatVecPtr = UndefValue::get(Builder.getPtrTy(0));
226-
Value *FloatVec = UndefValue::get(FloatVecTy);
225+
Value *FloatVecPtr = PoisonValue::get(Builder.getPtrTy(0));
226+
Value *FloatVec = PoisonValue::get(FloatVecTy);
227227

228228
// vp.load
229229
auto LoadVPID = VPIntrinsic::getForOpcode(Instruction::Load);

0 commit comments

Comments
 (0)