Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes https://bugs.llvm.org/show_bug.cgi?id=45303 (clang crashed on __builtin_thread_pointer) Reviewed By: lenary, MaskRay, luismarques Differential Revision: https://reviews.llvm.org/D76828
- Loading branch information
1 parent
b3f6e3d
commit aabc24a
Showing
3 changed files
with
32 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
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,14 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple=riscv64 | FileCheck %s | ||
; RUN: llc < %s -mtriple=riscv32 | FileCheck %s | ||
|
||
declare i8* @llvm.thread.pointer() | ||
|
||
define i8* @thread_pointer() nounwind { | ||
; CHECK-LABEL: thread_pointer: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: mv a0, tp | ||
; CHECK-NEXT: ret | ||
%1 = tail call i8* @llvm.thread.pointer() | ||
ret i8* %1 | ||
} |