2021-10-28 07:27:00 +08:00
|
|
|
; RUN: llc -mtriple arm-linux-gnueabi -o - %s | FileCheck %s -check-prefix=CHECK-SOFT
|
|
|
|
; RUN: llc -mtriple arm-linux-gnueabi -mattr=+read-tp-hard -o - %s | FileCheck %s -check-prefix=CHECK-HARD
|
|
|
|
; RUN: llc -mtriple thumbv7-linux-gnueabi -o - %s | FileCheck %s -check-prefix=CHECK-SOFT
|
|
|
|
; RUN: llc -mtriple thumbv7-linux-gnueabi -mattr=+read-tp-hard -o - %s | FileCheck %s -check-prefix=CHECK-HARD
|
2016-12-28 02:35:19 +08:00
|
|
|
|
|
|
|
declare i8* @llvm.thread.pointer()
|
2007-11-09 01:20:05 +08:00
|
|
|
|
|
|
|
define i8* @test() {
|
|
|
|
entry:
|
2016-12-28 02:35:19 +08:00
|
|
|
%tmp1 = call i8* @llvm.thread.pointer()
|
|
|
|
ret i8* %tmp1
|
2007-11-09 01:20:05 +08:00
|
|
|
}
|
|
|
|
|
2021-10-28 07:27:00 +08:00
|
|
|
; CHECK-SOFT: bl __aeabi_read_tp
|
|
|
|
; CHECK-HARD: mrc p15, #0, {{r[0-9]+}}, c13, c0, #3
|
2016-12-28 02:35:19 +08:00
|
|
|
|