[PATCH] D108961: [RISCV] MC relaxation for out-of-range conditional branch.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 30 17:47:12 PDT 2021
HsiangKai created this revision.
Herald added subscribers: vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
HsiangKai requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.
If .L1 <https://reviews.llvm.org/L1> is not within +-4KiB range,
convert
bge a0, a1, .L1 <https://reviews.llvm.org/L1>
to
blt a0, a1, 8
j .L1 <https://reviews.llvm.org/L1>
Fix the bug reported in
https://sifive.atlassian.net/browse/TOOLCHAIN-1011.
In this patch, if the symbol is unresolved at assembly time, do not do
this relaxation.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108961
Files:
llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMCCodeEmitter.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/test/MC/RISCV/fixups-diagnostics.s
llvm/test/MC/RISCV/long-conditional-jump.s
llvm/test/MC/RISCV/rv64-relax-all.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108961.369591.patch
Type: text/x-patch
Size: 12788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210831/5c46b963/attachment.bin>
More information about the llvm-commits
mailing list