[PATCH] D133481: Change operands of Add in AsmWriterTest from Undef to Poison
Manuel Brito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 03:03:50 PDT 2022
ManuelJBrito created this revision.
ManuelJBrito added a reviewer: nlopes.
Herald added a project: All.
ManuelJBrito requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Replacing UndefValue with PoisonValue in this test where it's use as dummy value in light of the efforts to remove undef from llvm.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133481
Files:
llvm/unittests/IR/AsmWriterTest.cpp
Index: llvm/unittests/IR/AsmWriterTest.cpp
===================================================================
--- llvm/unittests/IR/AsmWriterTest.cpp
+++ llvm/unittests/IR/AsmWriterTest.cpp
@@ -24,14 +24,14 @@
// has metadata attached but no parent.
LLVMContext Ctx;
auto Ty = Type::getInt32Ty(Ctx);
- auto Undef = UndefValue::get(Ty);
- std::unique_ptr<BinaryOperator> Add(BinaryOperator::CreateAdd(Undef, Undef));
+ auto Poison = PoisonValue::get(Ty);
+ std::unique_ptr<BinaryOperator> Add(BinaryOperator::CreateAdd(Poison, Poison));
Add->setMetadata(
"", MDNode::get(Ctx, {ConstantAsMetadata::get(ConstantInt::get(Ty, 1))}));
std::string S;
raw_string_ostream OS(S);
Add->print(OS);
- std::size_t r = OS.str().find("<badref> = add i32 undef, undef, !<empty");
+ std::size_t r = OS.str().find("<badref> = add i32 poison, poison, !<empty");
EXPECT_TRUE(r != std::string::npos);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133481.458691.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220908/178a1106/attachment-0001.bin>
More information about the llvm-commits
mailing list