From f8daf08aba1f09c3024a70d3426891112d1662a2 Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 12 Aug 2026 21:35:21 +0800 Subject: [RISCV] Consolidate instruction behavior in RISCVInstrInfo --- backend/lib/CodeGen/MachineFallthrough.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'backend/lib/CodeGen/MachineFallthrough.cpp') diff --git a/backend/lib/CodeGen/MachineFallthrough.cpp b/backend/lib/CodeGen/MachineFallthrough.cpp index a853f96..e912f0b 100644 --- a/backend/lib/CodeGen/MachineFallthrough.cpp +++ b/backend/lib/CodeGen/MachineFallthrough.cpp @@ -83,8 +83,7 @@ normalizeFallthroughs(MachineFunction &Function, const TargetDescription &Target Changed = true; } else if (Analysis->Conditional != nullptr && Analysis->Unconditional == nullptr && Analysis->FalseTarget != nullptr) { - auto Inserted = - Info.insertUnconditionalBranch(*Block, *Analysis->FalseTarget, Function, Target); + auto Inserted = Info.insertBranch(*Block, *Analysis->FalseTarget, Function, Target); if (!Inserted) return std::unexpected(Inserted.error()); Changed = true; @@ -102,7 +101,7 @@ normalizeFallthroughs(MachineFunction &Function, const TargetDescription &Target return makeUnexpected(ErrorCode::VerificationError, "fallthrough normalization encountered a null successor"); } - auto Inserted = Info.insertUnconditionalBranch(*Block, *Successor, Function, Target); + auto Inserted = Info.insertBranch(*Block, *Successor, Function, Target); if (!Inserted) return std::unexpected(Inserted.error()); Changed = true; -- cgit v1.2.3