1; RUN: opt -safe-stack -S -mtriple=i686-pc-linux-gnu < %s -o - | FileCheck --check-prefix=TLS --check-prefix=TLS32 %s 2; RUN: opt -safe-stack -S -mtriple=x86_64-pc-linux-gnu < %s -o - | FileCheck --check-prefix=TLS --check-prefix=TLS64 %s 3; RUN: opt -safe-stack -S -mtriple=i686-linux-android < %s -o - | FileCheck --check-prefix=TLS --check-prefix=TLS32 %s 4; RUN: opt -safe-stack -S -mtriple=x86_64-linux-android < %s -o - | FileCheck --check-prefix=TLS --check-prefix=TLS64 %s 5 6define void @foo() safestack sspreq { 7entry: 8; TLS32: %[[StackGuard:.*]] = load i8*, i8* addrspace(256)* inttoptr (i32 20 to i8* addrspace(256)*) 9; TLS64: %[[StackGuard:.*]] = load i8*, i8* addrspace(257)* inttoptr (i32 40 to i8* addrspace(257)*) 10; TLS: store i8* %[[StackGuard]], i8** %[[StackGuardSlot:.*]] 11 %a = alloca i8, align 1 12 call void @Capture(i8* %a) 13 14; TLS: %[[A:.*]] = load i8*, i8** %[[StackGuardSlot]] 15; TLS: icmp ne i8* %[[StackGuard]], %[[A]] 16 ret void 17} 18 19declare void @Capture(i8*) 20