brintos

brintos / llvm-project-archived public Read only

0
0
Text · 878 B · 35f1c28 Raw
29 lines · plain
1; RUN: llc < %s -mtriple x86_64-apple-darwin | FileCheck %s2 3@a = thread_local global i32 4, align 44 5define i32 @f2(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5) {6entry:7; Parameters are in %edi, %esi, %edx, %ecx, %r8d, there is no need to save8; these parameters except the one in %edi, before making the TLS call.9; %edi is used to pass parameter to the TLS call.10; CHECK-NOT: movl %r8d11; CHECK-NOT: movl %ecx12; CHECK-NOT: movl %edx13; CHECK-NOT: movl %esi14; CHECK: movq {{.*}}TLVP{{.*}}, %rdi15; CHECK-NEXT: callq16; CHECK-NEXT: movl (%rax),17; CHECK-NOT: movl {{.*}}, %esi18; CHECK-NOT: movl {{.*}}, %edx19; CHECK-NOT: movl {{.*}}, %ecx20; CHECK-NOT: movl {{.*}}, %r8d21; CHECK: callq22  %0 = load i32, ptr @a, align 423  %call = tail call i32 @f3(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5)24  %add = add nsw i32 %call, %025  ret i32 %add26}27 28declare i32 @f3(i32, i32, i32, i32, i32)29