1 ; RUN: llc --mtriple=loongarch32 --mattr=+d,+frecipe < %s | FileCheck %s
2 ; RUN: llc --mtriple=loongarch64 --mattr=+d,+frecipe < %s | FileCheck %s
4 declare double @llvm.loongarch.frecipe.d(double)
6 define double @frecipe_d(double %a) {
7 ; CHECK-LABEL: frecipe_d:
8 ; CHECK: # %bb.0: # %entry
9 ; CHECK-NEXT: frecipe.d $fa0, $fa0
12 %res = call double @llvm.loongarch.frecipe.d(double %a)
16 declare double @llvm.loongarch.frsqrte.d(double)
18 define double @frsqrte_d(double %a) {
19 ; CHECK-LABEL: frsqrte_d:
20 ; CHECK: # %bb.0: # %entry
21 ; CHECK-NEXT: frsqrte.d $fa0, $fa0
24 %res = call double @llvm.loongarch.frsqrte.d(double %a)