brintos

brintos / llvm-project-archived public Read only

0
0
Text · 716 B · 0b2029f Raw
27 lines · plain
1; RUN: llc --mtriple=loongarch32 --mattr=+f,+frecipe < %s | FileCheck %s2; RUN: llc --mtriple=loongarch64 --mattr=+f,+frecipe < %s | FileCheck %s3 4declare float @llvm.loongarch.frecipe.s(float)5 6define float @frecipe_s(float %a) {7; CHECK-LABEL: frecipe_s:8; CHECK:       # %bb.0: # %entry9; CHECK-NEXT:    frecipe.s $fa0, $fa010; CHECK-NEXT:    ret11entry:12  %res = call float @llvm.loongarch.frecipe.s(float %a)13  ret float %res14}15 16declare float @llvm.loongarch.frsqrte.s(float)17 18define float @frsqrte_s(float %a) {19; CHECK-LABEL: frsqrte_s:20; CHECK:       # %bb.0: # %entry21; CHECK-NEXT:    frsqrte.s $fa0, $fa022; CHECK-NEXT:    ret23entry:24  %res = call float @llvm.loongarch.frsqrte.s(float %a)25  ret float %res26}27