[PATCH] D129977: [LoongArch] Support load/store of dso_local PIC global values

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 17 17:17:22 PDT 2022


MaskRay created this revision.
MaskRay added reviewers: SixWeining, wangleiat, xen0n, xry111.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

lowerGlobalAddress added by D128427 <https://reviews.llvm.org/D128427> can be used for PIC. The actual condition is
that the global value needs to be dso_local (a dso_preemptable one needs GOT
indirection).

load-store.ll has UB due to out-of-bounds load/store. Fix the UB in the variable
test and add an array test. Note: PIC array index is currently wrong.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129977

Files:
  llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
  llvm/test/CodeGen/LoongArch/ir-instruction/load-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129977.445362.patch
Type: text/x-patch
Size: 4986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/9221a65b/attachment.bin>


More information about the llvm-commits mailing list