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