xref: /llvm-project/llvm/test/CodeGen/X86/storetrunc-fp.ll (revision 2f448bf509432c1a19ec46ab8cbc7353c03c6280)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- | FileCheck %s
3
4define void @foo(x86_fp80 %a, x86_fp80 %b, ptr %fp) {
5; CHECK-LABEL: foo:
6; CHECK:       # %bb.0:
7; CHECK-NEXT:    movl {{[0-9]+}}(%esp), %eax
8; CHECK-NEXT:    fldt {{[0-9]+}}(%esp)
9; CHECK-NEXT:    fldt {{[0-9]+}}(%esp)
10; CHECK-NEXT:    faddp %st, %st(1)
11; CHECK-NEXT:    fstps (%eax)
12; CHECK-NEXT:    retl
13	%c = fadd x86_fp80 %a, %b
14	%d = fptrunc x86_fp80 %c to float
15	store float %d, ptr %fp
16	ret void
17}
18