Skip to content

Commit

Permalink
[VectorBuilderTest] Use poison instead of undef for dummy values (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikic committed Jun 25, 2024
1 parent 9952e00 commit 68efc50
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions llvm/unittests/IR/VectorBuilderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions) {
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
bool IsFP = (#INSTCLASS)[0] == 'F'; \
auto *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
Value *Op = UndefValue::get(ValueTy); \
Value *Op = PoisonValue::get(ValueTy); \
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
{Op, Op}); \
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
Expand Down Expand Up @@ -115,7 +115,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions_FixedVector_NoMask) {
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
bool IsFP = (#INSTCLASS)[0] == 'F'; \
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
Value *Op = UndefValue::get(ValueTy); \
Value *Op = PoisonValue::get(ValueTy); \
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
{Op, Op}); \
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
Expand Down Expand Up @@ -161,7 +161,7 @@ TEST_F(VectorBuilderTest, TestCreateBinaryInstructions_FixedVector_NoEVL) {
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
bool IsFP = (#INSTCLASS)[0] == 'F'; \
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
Value *Op = UndefValue::get(ValueTy); \
Value *Op = PoisonValue::get(ValueTy); \
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
{Op, Op}); \
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
Expand Down Expand Up @@ -196,7 +196,7 @@ TEST_F(VectorBuilderTest,
auto VPID = VPIntrinsic::getForOpcode(Instruction::OPCODE); \
bool IsFP = (#INSTCLASS)[0] == 'F'; \
Type *ValueTy = IsFP ? FloatVecTy : IntVecTy; \
Value *Op = UndefValue::get(ValueTy); \
Value *Op = PoisonValue::get(ValueTy); \
auto *I = VBuild.createVectorInstruction(Instruction::OPCODE, ValueTy, \
{Op, Op}); \
ASSERT_TRUE(isa<VPIntrinsic>(I)); \
Expand All @@ -222,8 +222,8 @@ TEST_F(VectorBuilderTest, TestCreateLoadStore) {
auto *FloatVecTy =
FixedVectorType::get(Type::getFloatTy(Context), VectorNumElements);

Value *FloatVecPtr = UndefValue::get(Builder.getPtrTy(0));
Value *FloatVec = UndefValue::get(FloatVecTy);
Value *FloatVecPtr = PoisonValue::get(Builder.getPtrTy(0));
Value *FloatVec = PoisonValue::get(FloatVecTy);

// vp.load
auto LoadVPID = VPIntrinsic::getForOpcode(Instruction::Load);
Expand Down

0 comments on commit 68efc50

Please sign in to comment.