[llvm] [AVR] Fix a crash in AVRInstrInfo::insertIndirectBranch (PR #67324)

Ben Shi via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 20:27:26 PDT 2023


================
@@ -573,7 +573,7 @@ void AVRInstrInfo::insertIndirectBranch(MachineBasicBlock &MBB,
   if (STI.hasJMPCALL())
     BuildMI(&MBB, DL, get(AVR::JMPk)).addMBB(&NewDestBB);
   else
-    report_fatal_error("cannot create long jump without FeatureJMPCALL");
+    BuildMI(&MBB, DL, get(AVR::RJMPk)).addMBB(&NewDestBB);
----------------
benshi001 wrote:

No need to do so. The offset is sure to exceed, and incorrect is generated, and the report of "out of range" will be postponed to the assembler or the linker.

https://github.com/llvm/llvm-project/pull/67324


More information about the llvm-commits mailing list