[llvm] [SandboxIR] Implement missing PHINode functions (PR #101734)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 11:16:10 PDT 2024
================
@@ -1974,7 +1975,19 @@ define void @foo(i32 %arg) {
EXPECT_EQ(PHI->hasConstantOrUndefValue(), LLVMPHI->hasConstantOrUndefValue());
// Check isComplete().
EXPECT_EQ(PHI->isComplete(), LLVMPHI->isComplete());
-
+ // Check replaceIncomingBlockWith
+ OrigBB = PHI->getIncomingBlock(0);
+ auto *NewBB = BB2;
+ EXPECT_NE(NewBB, OrigBB);
+ PHI->replaceIncomingBlockWith(OrigBB, NewBB);
+ EXPECT_EQ(PHI->getIncomingBlock(0), NewBB);
----------------
vporpo wrote:
Let's also check that no other incoming block has changed.
https://github.com/llvm/llvm-project/pull/101734
More information about the llvm-commits
mailing list