1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=csky -mattr=+fpuv2_sf,+fpuv2_df,+hard-float -float-abi=hard -verify-machineinstrs -csky-no-aliases < %s \
3 ; RUN: | FileCheck -check-prefix=CSKYF %s
5 @gd = external global double
7 define double @constraint_f_double(double %a) nounwind {
8 ; CSKYF-LABEL: constraint_f_double:
10 ; CSKYF-NEXT: subi16 sp, sp, 4
11 ; CSKYF-NEXT: lrw32 a0, [.LCPI0_0]
12 ; CSKYF-NEXT: fldd vr1, (a0, 0)
14 ; CSKYF-NEXT: faddd vr0, vr0, vr1
16 ; CSKYF-NEXT: addi16 sp, sp, 4
18 ; CSKYF-NEXT: .p2align 1
19 ; CSKYF-NEXT: # %bb.1:
20 ; CSKYF-NEXT: .p2align 2
21 ; CSKYF-NEXT: .LCPI0_0:
22 ; CSKYF-NEXT: .long gd
24 %1 = load double, ptr @gd
25 %2 = tail call double asm "faddd $0, $1, $2", "=v,v,v"(double %a, double %1)
29 define double @constraint_f_double_abi_name(double %a) nounwind {
30 ; CSKYF-LABEL: constraint_f_double_abi_name:
32 ; CSKYF-NEXT: subi16 sp, sp, 4
33 ; CSKYF-NEXT: lrw32 a0, [.LCPI1_0]
34 ; CSKYF-NEXT: fldd vr3, (a0, 0)
35 ; CSKYF-NEXT: fmovd vr2, vr0
37 ; CSKYF-NEXT: faddd vr1, vr2, vr3
39 ; CSKYF-NEXT: fmovd vr0, vr1
40 ; CSKYF-NEXT: addi16 sp, sp, 4
42 ; CSKYF-NEXT: .p2align 1
43 ; CSKYF-NEXT: # %bb.1:
44 ; CSKYF-NEXT: .p2align 2
45 ; CSKYF-NEXT: .LCPI1_0:
46 ; CSKYF-NEXT: .long gd
48 %1 = load double, ptr @gd
49 %2 = tail call double asm "faddd $0, $1, $2", "={fr1},{fr2},{fr3}"(double %a, double %1)