1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple=loongarch32 --mattr=+d < %s | FileCheck %s --check-prefix=LA32
3 ; RUN: llc --mtriple=loongarch64 --mattr=+d < %s | FileCheck %s --check-prefix=LA64
5 ;; Exercise the 'fsub' LLVM IR: https://llvm.org/docs/LangRef.html#fsub-instruction
7 define float @fsub_s(float %x, float %y) {
10 ; LA32-NEXT: fsub.s $fa0, $fa0, $fa1
15 ; LA64-NEXT: fsub.s $fa0, $fa0, $fa1
17 %sub = fsub float %x, %y
21 define double @fsub_d(double %x, double %y) {
24 ; LA32-NEXT: fsub.d $fa0, $fa0, $fa1
29 ; LA64-NEXT: fsub.d $fa0, $fa0, $fa1
31 %sub = fsub double %x, %y
35 define float @fneg_s(float %x) {
38 ; LA32-NEXT: fneg.s $fa0, $fa0
43 ; LA64-NEXT: fneg.s $fa0, $fa0
45 %res = fsub float -0.0, %x
49 define double @fneg_d(double %x) {
52 ; LA32-NEXT: fneg.d $fa0, $fa0
57 ; LA64-NEXT: fneg.d $fa0, $fa0
59 %res = fsub double -0.0, %x