From 7364e0fe613b93cc5ca2686db5ad3cca23706d70 Mon Sep 17 00:00:00 2001 From: Mariusz Sikora Date: Wed, 1 Apr 2026 07:46:19 -0400 Subject: [PATCH] Update tests to not use Br instruction Upstream LLVM split Br into CondBr/UncondBr https://github.com/llvm/llvm-project/pull/184027 --- test/unit/interface/OpMapTests.cpp | 10 +++++----- test/unit/interface/OpSetTests.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/unit/interface/OpMapTests.cpp b/test/unit/interface/OpMapTests.cpp index 4d5dc04..bf8b7c8 100644 --- a/test/unit/interface/OpMapTests.cpp +++ b/test/unit/interface/OpMapTests.cpp @@ -34,17 +34,17 @@ TEST(OpMapBasicTestsName, CoreOpContainsTests) { OpMap map; OpDescription retDesc = OpDescription::fromCoreOp(Instruction::Ret); - OpDescription brDesc = OpDescription::fromCoreOp(Instruction::Br); + OpDescription callBrDesc = OpDescription::fromCoreOp(Instruction::CallBr); map[retDesc] = "RetInst"; EXPECT_TRUE(map.containsCoreOp(Instruction::Ret)); - EXPECT_FALSE(map.containsCoreOp(Instruction::Br)); + EXPECT_FALSE(map.containsCoreOp(Instruction::CallBr)); EXPECT_EQ(map[retDesc], "RetInst"); - map[brDesc] = "BrInst"; + map[callBrDesc] = "CallBrInst"; EXPECT_EQ(map[retDesc], "RetInst"); - EXPECT_TRUE(map.containsCoreOp(Instruction::Br)); - EXPECT_EQ(map[brDesc], "BrInst"); + EXPECT_TRUE(map.containsCoreOp(Instruction::CallBr)); + EXPECT_EQ(map[callBrDesc], "CallBrInst"); } TEST(OpMapBasicTestsName, IntrinsicOpContainsTests) { diff --git a/test/unit/interface/OpSetTests.cpp b/test/unit/interface/OpSetTests.cpp index 1f99da9..f0cce52 100644 --- a/test/unit/interface/OpSetTests.cpp +++ b/test/unit/interface/OpSetTests.cpp @@ -65,9 +65,9 @@ TEST(DialectsOpSetSizeTestsName, NonEmptyOpDescriptionsTemplatizedMakerTest) { } TEST(DialectsOpSetContainsTestsName, containsCoreOps) { - const OpSet set = OpSet::fromCoreOpcodes({1, 2}); // Ret, Br + const OpSet set = OpSet::fromCoreOpcodes({Instruction::Ret, Instruction::CallBr}); EXPECT_TRUE(set.containsCoreOp(Instruction::Ret)); - EXPECT_TRUE(set.containsCoreOp(Instruction::Br)); + EXPECT_TRUE(set.containsCoreOp(Instruction::CallBr)); EXPECT_FALSE(set.containsCoreOp(Instruction::Switch)); }