1; RUN: llc -mtriple=armeb-linux-gnueabihf -O2 -mattr=+read-tp-tpidrurw %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRURW 2; RUN: llc -mtriple=armeb-linux-gnueabihf -O2 -mattr=+read-tp-tpidruro %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRURO 3; RUN: llc -mtriple=armeb-linux-gnueabihf -O2 -mattr=+read-tp-tpidrprw %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRPRW 4; RUN: llc -mtriple=armeb-linux-gnueabihf -O2 %s -o - | FileCheck %s -check-prefix=CHECK-SOFT 5; RUN: llc -mtriple=thumbv7-linux-gnueabihf -O2 -mattr=+read-tp-tpidrurw %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRURW 6; RUN: llc -mtriple=thumbv7-linux-gnueabihf -O2 -mattr=+read-tp-tpidruro %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRURO 7; RUN: llc -mtriple=thumbv7-linux-gnueabihf -O2 -mattr=+read-tp-tpidrprw %s -o - | FileCheck %s -check-prefix=CHECK-TPIDRPRW 8; RUN: llc -mtriple=thumbv7-linux-gnueabihf -O2 %s -o - | FileCheck %s -check-prefix=CHECK-SOFT 9 10 11; __thread int counter; 12; void foo() { 13; counter = 5; 14; } 15 16 17@counter = thread_local local_unnamed_addr global i32 0, align 4 18 19define void @foo() local_unnamed_addr #0 { 20entry: 21 store i32 5, ptr @counter, align 4 22 ret void 23} 24 25 26; CHECK-LABEL: foo: 27; CHECK-TPIDRURW: mrc p15, #0, {{r[0-9]+}}, c13, c0, #2 28; CHECK-TPIDRURO: mrc p15, #0, {{r[0-9]+}}, c13, c0, #3 29; CHECK-TPIDRPRW: mrc p15, #0, {{r[0-9]+}}, c13, c0, #4 30; CHECK-SOFT: bl __aeabi_read_tp 31