1; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s 2; RUN: llc < %s -mtriple=aarch64-fuchsia | FileCheck %s 3; RUN: llc < %s -mtriple=aarch64-linux-gnu -mattr=+tpidr-el1 | FileCheck --check-prefix=USEEL1 %s 4; RUN: llc < %s -mtriple=aarch64-linux-gnu -mattr=+tpidr-el2 | FileCheck --check-prefix=USEEL2 %s 5; RUN: llc < %s -mtriple=aarch64-linux-gnu -mattr=+tpidr-el3 | FileCheck --check-prefix=USEEL3 %s 6 7; Function Attrs: nounwind readnone 8declare i8* @llvm.thread.pointer() #1 9 10define i8* @thread_pointer() { 11; CHECK: thread_pointer: 12; CHECK: mrs {{x[0-9]+}}, TPIDR_EL0 13; USEEL1: thread_pointer: 14; USEEL1: mrs {{x[0-9]+}}, TPIDR_EL1 15; USEEL2: thread_pointer: 16; USEEL2: mrs {{x[0-9]+}}, TPIDR_EL2 17; USEEL3: thread_pointer: 18; USEEL3: mrs {{x[0-9]+}}, TPIDR_EL3 19 %1 = tail call i8* @llvm.thread.pointer() 20 ret i8* %1 21} 22