fpext_and_fptrunc.ll 834 Bytes
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc  -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP32
; RUN: llc  -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP64

define double @fpext(float %a) {
; MIPS32-LABEL: fpext:
; MIPS32:       # %bb.0: # %entry
; MIPS32-NEXT:    cvt.d.s $f0, $f12
; MIPS32-NEXT:    jr $ra
; MIPS32-NEXT:    nop
entry:
  %conv = fpext float %a to double
  ret double %conv
}

define float @fptrunc(double %a) {
; MIPS32-LABEL: fptrunc:
; MIPS32:       # %bb.0: # %entry
; MIPS32-NEXT:    cvt.s.d $f0, $f12
; MIPS32-NEXT:    jr $ra
; MIPS32-NEXT:    nop
entry:
  %conv = fptrunc double %a to float
  ret float %conv
}