37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp --version 52; RUN: llc < %s -mtriple=i386-unknown-linux-gnu | FileCheck %s3; Test for issue https://github.com/llvm/llvm-project/issues/1153234 5declare double @g(double, double)6 7; Though not visible within the IR, this will lower to an FSINCOS node, with8; store users, that are within a (callseq_start, callseq_end) pair. In this9; case, the stores cannot be folded into the sincos call.10define double @negative_sincos_with_stores_within_call_sequence(double %a) nounwind {11; CHECK-LABEL: negative_sincos_with_stores_within_call_sequence:12; CHECK: # %bb.0: # %entry13; CHECK-NEXT: subl $44, %esp14; CHECK-NEXT: fldl 48(%esp)15; CHECK-NEXT: leal 24(%esp), %eax16; CHECK-NEXT: movl %eax, 12(%esp)17; CHECK-NEXT: leal 32(%esp), %eax18; CHECK-NEXT: movl %eax, 8(%esp)19; CHECK-NEXT: fstpl (%esp)20; CHECK-NEXT: calll sincos21; CHECK-NEXT: fldl 32(%esp)22; CHECK-NEXT: fldl 24(%esp)23; CHECK-NEXT: faddl {{\.?LCPI[0-9]+_[0-9]+}}24; CHECK-NEXT: fxch %st(1)25; CHECK-NEXT: fstpl 8(%esp)26; CHECK-NEXT: fstpl (%esp)27; CHECK-NEXT: calll g@PLT28; CHECK-NEXT: addl $44, %esp29; CHECK-NEXT: retl30entry:31 %0 = tail call double @llvm.sin.f64(double %a)32 %1 = tail call double @llvm.cos.f64(double %a)33 %add = fadd double %1, 3.140000e+0034 %call = tail call double @g(double %add, double %0)35 ret double %call36}37