From: Siu Kwan Lam <1929845+sklam@users.noreply.github.com>
Origin: https://github.com/numba/numba/pull/8545
Date: Fri, 9 Sep 2022 16:38:28 -0500
Subject: Fix backward jump offset

---
 numba/core/bytecode.py | 2 +-
 numba/core/byteflow.py | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/numba/core/bytecode.py b/numba/core/bytecode.py
index 6b7bb0f..e75432c 100644
--- a/numba/core/bytecode.py
+++ b/numba/core/bytecode.py
@@ -95,7 +95,7 @@ class ByteCodeInst(object):
                                for k in ("JUMP_BACKWARD",
                                          "POP_JUMP_BACKWARD_IF_TRUE",
                                          "POP_JUMP_BACKWARD_IF_FALSE")):
-                return self.offset - self.arg * 2
+                return self.offset - (self.arg - 1) * 2
         if PYVERSION >= (3, 10):
             if self.opcode in JREL_OPS:
                 return self.next + self.arg * 2
diff --git a/numba/core/byteflow.py b/numba/core/byteflow.py
index 4655663..a6ece05 100644
--- a/numba/core/byteflow.py
+++ b/numba/core/byteflow.py
@@ -628,7 +628,6 @@ class TraceRunner(object):
     def _op_POP_JUMP_IF(self, state, inst):
         pred = state.pop()
         state.append(inst, pred=pred)
-
         target_inst = inst.get_jump_target()
         next_inst = inst.next
         # if the next inst and the jump target are the same location, issue one
