[PATCH] D108961: [RISCV] MC relaxation for out-of-range conditional branch.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 10:43:57 PST 2023
MaskRay 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);
+
----------------
`isInt<13>(Offset)`.
`(Offset > 4094 || Offset < -4096);` is not different from `(Offset > 4095 || Offset < -4096);`
================
Comment at: llvm/test/MC/RISCV/long-conditional-jump.s:1
+# RUN: llvm-mc -filetype=obj -triple riscv64 < %s \
+# RUN: | llvm-objdump -d -M no-aliases - \
----------------
`< %s` => `%s`
================
Comment at: llvm/test/MC/RISCV/long-conditional-jump.s:4
+# RUN: | FileCheck --check-prefix=CHECK-INST %s
+# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c < %s \
+# RUN: | llvm-objdump -d -M no-aliases - \
----------------
`-triple=riscv64`
Consistently use `=` or ` ` separator.
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