forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PowerPC][PCRelative] Set TLS unsupported with PC relative memops
Introduce a fatal error if any thread local storage code is compiled using pc relative memory operations as well as a hidden override option `-enable-ppc-pcrel-tls` so that this support can be incrementally added if possible. Reviewed By: #powerpc, nemanjai Differential Revision: https://reviews.llvm.org/D85448
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: not --crash llc -mcpu=pwr10 -mtriple=powerpc64le-unknown-linux-gnu \ | ||
; RUN: -verify-machineinstrs -mattr=+pcrelative-memops -o - < %s 2>&1 | \ | ||
; RUN: FileCheck %s --check-prefix=CHECK-PCREL | ||
; RUN: llc -mcpu=pwr10 -mtriple=powerpc64le-unknown-linux-gnu \ | ||
; RUN: -verify-machineinstrs -mattr=-pcrelative-memops -o - < %s 2>&1 | \ | ||
; RUN: FileCheck %s --check-prefix=CHECK-NOPCREL | ||
|
||
; CHECK-PCREL: Thread local storage is not supported with pc-relative addressing | ||
; CHECK-NOPCREL: blr | ||
|
||
@x = external thread_local global i32, align 4 | ||
|
||
define i32* @testTLS() { | ||
entry: | ||
ret i32* @x | ||
} |