[PATCH] D147849: [Android] Use ELF TLS for Android API level 29+
Brad Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 16:35:36 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb71f2fcd4679: [Android] Use ELF TLS for Android API level 29+ (authored by brad).
Changed prior to commit:
https://reviews.llvm.org/D147849?vs=511879&id=514452#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147849/new/
https://reviews.llvm.org/D147849
Files:
llvm/include/llvm/TargetParser/Triple.h
llvm/test/CodeGen/AArch64/emutls_generic.ll
llvm/test/CodeGen/X86/emutls-pic.ll
llvm/test/CodeGen/X86/emutls-pie.ll
llvm/test/CodeGen/X86/emutls_generic.ll
llvm/test/CodeGen/X86/fast-isel-emutls.ll
Index: llvm/test/CodeGen/X86/fast-isel-emutls.ll
===================================================================
--- llvm/test/CodeGen/X86/fast-isel-emutls.ll
+++ llvm/test/CodeGen/X86/fast-isel-emutls.ll
@@ -1,6 +1,8 @@
; RUN: llc < %s -emulated-tls -relocation-model=pic -mtriple=i686-unknown-linux-gnu -fast-isel | FileCheck %s
; RUN: llc < %s -relocation-model=pic -mtriple=i686-unknown-linux-gnu -fast-isel \
; RUN: | FileCheck -check-prefix=NoEMU %s
+; RUN: llc < %s -relocation-model=pic -mtriple=i686-linux-android29 -fast-isel \
+; RUN: | FileCheck -check-prefix=NoEMU %s
; PR3654
; NoEMU-NOT: __emutls
Index: llvm/test/CodeGen/X86/emutls_generic.ll
===================================================================
--- llvm/test/CodeGen/X86/emutls_generic.ll
+++ llvm/test/CodeGen/X86/emutls_generic.ll
@@ -15,6 +15,8 @@
; RUN: | FileCheck -check-prefix=X86_64 %s
; RUN: llc < %s -mtriple=i386-linux-gnu -relocation-model=pic \
; RUN: | FileCheck -check-prefix=NoEMU %s
+; RUN: llc < %s -mtriple=i686-linux-android29 -relocation-model=pic \
+; RUN: | FileCheck -check-prefix=NoEMU %s
; NoEMU-NOT: __emutls
Index: llvm/test/CodeGen/X86/emutls-pie.ll
===================================================================
--- llvm/test/CodeGen/X86/emutls-pie.ll
+++ llvm/test/CodeGen/X86/emutls-pie.ll
@@ -11,6 +11,8 @@
; RUN: | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic \
; RUN: | FileCheck -check-prefix=NoEMU %s
+; RUN: llc < %s -mcpu=generic -mtriple=i386-linux-android29 -relocation-model=pic \
+; RUN: | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mcpu=generic -mtriple=i386-linux-android -relocation-model=pic \
; RUN: | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -mcpu=generic -mtriple=x86_64-linux-android -relocation-model=pic \
Index: llvm/test/CodeGen/X86/emutls-pic.ll
===================================================================
--- llvm/test/CodeGen/X86/emutls-pic.ll
+++ llvm/test/CodeGen/X86/emutls-pic.ll
@@ -5,6 +5,7 @@
; RUN: llc < %s -mtriple=i386-linux-gnu -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=x86_64-linux-gnu -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
+; RUN: llc < %s -mtriple=x86_64-linux-android29 -relocation-model=pic | FileCheck -check-prefix=NoEMU %s
; RUN: llc < %s -mtriple=i386-linux-android -relocation-model=pic | FileCheck -check-prefix=X86 %s
; RUN: llc < %s -mtriple=x86_64-linux-android -relocation-model=pic | FileCheck -check-prefix=X64 %s
; RUN: llc < %s -mtriple=i386-linux-ohos -relocation-model=pic | FileCheck -check-prefix=X86 %s
Index: llvm/test/CodeGen/AArch64/emutls_generic.ll
===================================================================
--- llvm/test/CodeGen/AArch64/emutls_generic.ll
+++ llvm/test/CodeGen/AArch64/emutls_generic.ll
@@ -18,6 +18,8 @@
; aarch64-windows-gnu needs explicit -emulated-tls
; RUN: llc < %s -mtriple=aarch64-apple-darwin -O3 \
; RUN: | FileCheck -check-prefix=NoEMU %s
+; RUN: llc < %s -mtriple=aarch64-linux-android29 -O3 \
+; RUN: | FileCheck -check-prefix=NoEMU %s
; NoEMU-NOT: __emutls
Index: llvm/include/llvm/TargetParser/Triple.h
===================================================================
--- llvm/include/llvm/TargetParser/Triple.h
+++ llvm/include/llvm/TargetParser/Triple.h
@@ -979,9 +979,11 @@
}
/// Tests whether the target uses emulated TLS as default.
+ ///
+ /// Note: Android API level 29 (10) introduced ELF TLS.
bool hasDefaultEmulatedTLS() const {
- return isAndroid() || isOSOpenBSD() || isWindowsCygwinEnvironment() ||
- isOHOSFamily();
+ return (isAndroid() && isAndroidVersionLT(29)) || isOSOpenBSD() ||
+ isWindowsCygwinEnvironment() || isOHOSFamily();
}
/// Tests whether the target uses -data-sections as default.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147849.514452.patch
Type: text/x-patch
Size: 3903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230417/782662a2/attachment.bin>
More information about the llvm-commits
mailing list