[PATCH] D121654: [RISCV] Ensure PseudoLA* can be hoisted
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 17:41:13 PDT 2022
jrtc27 created this revision.
jrtc27 added reviewers: asb, craig.topper, luismarques, MaskRay.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, asbirlea, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
Herald added a project: All.
jrtc27 requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.
Since we mark the pseudos as mayLoad but do not provide any MMOs,
isSafeToMove conservatively returns false, stopping MachineLICM from
hoisting the instructions. PseudoLA_TLS_GD does not actually expand to a
load, so stop marking that as mayLoad to allow it to be hoisted, and for
the others make sure to add MMOs during lowering to indicate they're GOT
loads and thus can be freely moved.
Fixes https://github.com/llvm/llvm-project/issues/54372
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D121654
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.td
llvm/test/CodeGen/RISCV/machinelicm-got.ll
llvm/test/CodeGen/RISCV/mir-target-flags.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121654.415286.patch
Type: text/x-patch
Size: 9714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220315/f6a03792/attachment-0001.bin>
More information about the llvm-commits
mailing list