100 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2 | FileCheck %s --check-prefixes=X644 5define float @fneg_strict_fadd_to_strict_fsub(float %x, float %y) nounwind strictfp {6; X86-LABEL: fneg_strict_fadd_to_strict_fsub:7; X86: # %bb.0:8; X86-NEXT: pushl %eax9; X86-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero10; X86-NEXT: subss {{[0-9]+}}(%esp), %xmm011; X86-NEXT: movss %xmm0, (%esp)12; X86-NEXT: flds (%esp)13; X86-NEXT: wait14; X86-NEXT: popl %eax15; X86-NEXT: retl16;17; X64-LABEL: fneg_strict_fadd_to_strict_fsub:18; X64: # %bb.0:19; X64-NEXT: subss %xmm1, %xmm020; X64-NEXT: retq21 %neg = fneg float %y22 %add = call float @llvm.experimental.constrained.fadd.f32(float %x, float %neg, metadata!"round.dynamic", metadata!"fpexcept.strict")23 ret float %add24}25 26define float @fneg_strict_fadd_to_strict_fsub_2(float %x, float %y) nounwind strictfp {27; X86-LABEL: fneg_strict_fadd_to_strict_fsub_2:28; X86: # %bb.0:29; X86-NEXT: pushl %eax30; X86-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero31; X86-NEXT: subss {{[0-9]+}}(%esp), %xmm032; X86-NEXT: movss %xmm0, (%esp)33; X86-NEXT: flds (%esp)34; X86-NEXT: wait35; X86-NEXT: popl %eax36; X86-NEXT: retl37;38; X64-LABEL: fneg_strict_fadd_to_strict_fsub_2:39; X64: # %bb.0:40; X64-NEXT: subss %xmm1, %xmm041; X64-NEXT: retq42 %neg = fneg float %y43 %add = call float @llvm.experimental.constrained.fadd.f32(float %neg, float %x, metadata!"round.dynamic", metadata!"fpexcept.strict")44 ret float %add45}46 47define double @fneg_strict_fadd_to_strict_fsub_d(double %x, double %y) nounwind strictfp {48; X86-LABEL: fneg_strict_fadd_to_strict_fsub_d:49; X86: # %bb.0:50; X86-NEXT: pushl %ebp51; X86-NEXT: movl %esp, %ebp52; X86-NEXT: andl $-8, %esp53; X86-NEXT: subl $8, %esp54; X86-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero55; X86-NEXT: subsd 16(%ebp), %xmm056; X86-NEXT: movsd %xmm0, (%esp)57; X86-NEXT: fldl (%esp)58; X86-NEXT: wait59; X86-NEXT: movl %ebp, %esp60; X86-NEXT: popl %ebp61; X86-NEXT: retl62;63; X64-LABEL: fneg_strict_fadd_to_strict_fsub_d:64; X64: # %bb.0:65; X64-NEXT: subsd %xmm1, %xmm066; X64-NEXT: retq67 %neg = fneg double %y68 %add = call double @llvm.experimental.constrained.fadd.f64(double %x, double %neg, metadata!"round.dynamic", metadata!"fpexcept.strict")69 ret double %add70}71 72define double @fneg_strict_fadd_to_strict_fsub_2d(double %x, double %y) nounwind strictfp {73; X86-LABEL: fneg_strict_fadd_to_strict_fsub_2d:74; X86: # %bb.0:75; X86-NEXT: pushl %ebp76; X86-NEXT: movl %esp, %ebp77; X86-NEXT: andl $-8, %esp78; X86-NEXT: subl $8, %esp79; X86-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero80; X86-NEXT: subsd 16(%ebp), %xmm081; X86-NEXT: movsd %xmm0, (%esp)82; X86-NEXT: fldl (%esp)83; X86-NEXT: wait84; X86-NEXT: movl %ebp, %esp85; X86-NEXT: popl %ebp86; X86-NEXT: retl87;88; X64-LABEL: fneg_strict_fadd_to_strict_fsub_2d:89; X64: # %bb.0:90; X64-NEXT: subsd %xmm1, %xmm091; X64-NEXT: retq92 %neg = fneg double %y93 %add = call double @llvm.experimental.constrained.fadd.f64(double %neg, double %x, metadata!"round.dynamic", metadata!"fpexcept.strict")94 ret double %add95}96 97 98declare float @llvm.experimental.constrained.fadd.f32(float, float, metadata, metadata)99declare double @llvm.experimental.constrained.fadd.f64(double, double, metadata, metadata)100