aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/LoongArch
diff options
context:
space:
mode:
authorwanglei <wanglei@loongson.cn>2024-06-12 17:41:26 +0800
committerGitHub <noreply@github.com>2024-06-12 17:41:26 +0800
commit7a4fab410124144f0196bdee6645b649799dec15 (patch)
tree58d18cbba153b2d87727f596a0a0c67320339838 /llvm/lib/Target/LoongArch
parentea6577a74baebcc287f8b24d8b098f1d70085911 (diff)
downloadllvm-7a4fab410124144f0196bdee6645b649799dec15.zip
llvm-7a4fab410124144f0196bdee6645b649799dec15.tar.gz
llvm-7a4fab410124144f0196bdee6645b649799dec15.tar.bz2
[LoongArch] Emit error messages when using emulated TLS
Reviewed By: SixWeining Pull Request: https://github.com/llvm/llvm-project/pull/92483
Diffstat (limited to 'llvm/lib/Target/LoongArch')
-rw-r--r--llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
index 9d7e463..1721287 100644
--- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
+++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
@@ -945,6 +945,10 @@ LoongArchTargetLowering::lowerGlobalTLSAddress(SDValue Op,
GlobalAddressSDNode *N = cast<GlobalAddressSDNode>(Op);
assert(N->getOffset() == 0 && "unexpected offset in global node");
+ if (DAG.getTarget().useEmulatedTLS())
+ report_fatal_error("the emulated TLS is prohibited",
+ /*GenCrashDiag=*/false);
+
bool IsDesc = DAG.getTarget().useTLSDESC();
switch (getTargetMachine().getTLSModel(N->getGlobal())) {