[PATCH] D108961: [RISCV] MC relaxation for out-of-range conditional branch.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 11:09:55 PST 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp:153
+  if (Kind == RISCV::fixup_riscv_branch)
+    return Resolved && (Offset > 4094 || Offset < -4096);
+
----------------
MaskRay wrote:
> `isInt<13>(Offset)`.
> 
> `(Offset > 4094 || Offset < -4096);` is not different from `(Offset > 4095 || Offset < -4096);`
Seems like this comment would apply to line 168 and 172 as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108961/new/

https://reviews.llvm.org/D108961



More information about the llvm-commits mailing list