|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp --no_x86_scrub_mem_shuffle --version 5 |
| 2 | +; RUN: llc < %s | FileCheck %s |
| 3 | + |
| 4 | +target triple = "x86_64-sie-ps5" |
| 5 | + |
| 6 | +declare hidden void @use_ptr(ptr readonly) local_unnamed_addr |
| 7 | + |
| 8 | +define hidden noundef i32 @sincos_stack_slot_with_lifetime(float %in) local_unnamed_addr { |
| 9 | +; CHECK-LABEL: sincos_stack_slot_with_lifetime: |
| 10 | +; CHECK: # %bb.0: # %entry |
| 11 | +; CHECK-NEXT: pushq %rbx |
| 12 | +; CHECK-NEXT: .cfi_def_cfa_offset 16 |
| 13 | +; CHECK-NEXT: subq $16, %rsp |
| 14 | +; CHECK-NEXT: .cfi_def_cfa_offset 32 |
| 15 | +; CHECK-NEXT: .cfi_offset %rbx, -16 |
| 16 | +; CHECK-NEXT: leaq 12(%rsp), %rdi |
| 17 | +; CHECK-NEXT: leaq 8(%rsp), %rbx |
| 18 | +; CHECK-NEXT: movq %rbx, %rsi |
| 19 | +; CHECK-NEXT: callq sincosf@PLT |
| 20 | +; CHECK-NEXT: movq %rbx, %rdi |
| 21 | +; CHECK-NEXT: callq use_ptr |
| 22 | +; CHECK-NEXT: movss 12(%rsp), %xmm0 # xmm0 = mem[0],zero,zero,zero |
| 23 | +; CHECK-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 24 | +; CHECK-NEXT: movss %xmm0, 8(%rsp) |
| 25 | +; CHECK-NEXT: leaq 8(%rsp), %rdi |
| 26 | +; CHECK-NEXT: callq use_ptr |
| 27 | +; CHECK-NEXT: movss 8(%rsp), %xmm0 # xmm0 = mem[0],zero,zero,zero |
| 28 | +; CHECK-NEXT: xorps {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0 |
| 29 | +; CHECK-NEXT: movss %xmm0, 8(%rsp) |
| 30 | +; CHECK-NEXT: leaq 8(%rsp), %rdi |
| 31 | +; CHECK-NEXT: callq use_ptr |
| 32 | +; CHECK-NEXT: xorl %eax, %eax |
| 33 | +; CHECK-NEXT: addq $16, %rsp |
| 34 | +; CHECK-NEXT: .cfi_def_cfa_offset 16 |
| 35 | +; CHECK-NEXT: popq %rbx |
| 36 | +; CHECK-NEXT: .cfi_def_cfa_offset 8 |
| 37 | +; CHECK-NEXT: retq |
| 38 | +entry: |
| 39 | + %computed = alloca float, align 4 |
| 40 | + %computed1 = alloca float, align 4 |
| 41 | + %computed3 = alloca float, align 4 |
| 42 | + %0 = tail call { float, float } @llvm.sincos.f32(float %in) |
| 43 | + %1 = extractvalue { float, float } %0, 0 |
| 44 | + %2 = extractvalue { float, float } %0, 1 |
| 45 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %computed) |
| 46 | + store float %2, ptr %computed, align 4 |
| 47 | + call void @use_ptr(ptr nonnull %computed) |
| 48 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %computed) |
| 49 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %computed1) |
| 50 | + %fneg = fneg float %1 |
| 51 | + store float %fneg, ptr %computed1, align 4 |
| 52 | + call void @use_ptr(ptr nonnull %computed1) |
| 53 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %computed1) |
| 54 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %computed3) |
| 55 | + %fneg4 = fneg float %2 |
| 56 | + store float %fneg4, ptr %computed3, align 4 |
| 57 | + call void @use_ptr(ptr nonnull %computed3) |
| 58 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %computed3) |
| 59 | + ret i32 0 |
| 60 | +} |
| 61 | + |
0 commit comments