1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP32
3 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32,FP64
5 declare float @llvm.ceil.f32(float)
6 define float @ceil_f32(float %a) {
7 ; MIPS32-LABEL: ceil_f32:
8 ; MIPS32: # %bb.0: # %entry
9 ; MIPS32-NEXT: addiu $sp, $sp, -24
10 ; MIPS32-NEXT: .cfi_def_cfa_offset 24
11 ; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
12 ; MIPS32-NEXT: .cfi_offset 31, -4
13 ; MIPS32-NEXT: jal ceilf
15 ; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
16 ; MIPS32-NEXT: addiu $sp, $sp, 24
20 %0 = call float @llvm.ceil.f32(float %a)
24 declare double @llvm.ceil.f64(double)
25 define double @ceil_f64(double %a) {
26 ; MIPS32-LABEL: ceil_f64:
27 ; MIPS32: # %bb.0: # %entry
28 ; MIPS32-NEXT: addiu $sp, $sp, -24
29 ; MIPS32-NEXT: .cfi_def_cfa_offset 24
30 ; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
31 ; MIPS32-NEXT: .cfi_offset 31, -4
32 ; MIPS32-NEXT: jal ceil
34 ; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
35 ; MIPS32-NEXT: addiu $sp, $sp, 24
39 %0 = call double @llvm.ceil.f64(double %a)
43 declare float @llvm.floor.f32(float)
44 define float @floor_f32(float %a) {
45 ; MIPS32-LABEL: floor_f32:
46 ; MIPS32: # %bb.0: # %entry
47 ; MIPS32-NEXT: addiu $sp, $sp, -24
48 ; MIPS32-NEXT: .cfi_def_cfa_offset 24
49 ; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
50 ; MIPS32-NEXT: .cfi_offset 31, -4
51 ; MIPS32-NEXT: jal floorf
53 ; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
54 ; MIPS32-NEXT: addiu $sp, $sp, 24
58 %0 = call float @llvm.floor.f32(float %a)
62 declare double @llvm.floor.f64(double)
63 define double @floor_f64(double %a) {
64 ; MIPS32-LABEL: floor_f64:
65 ; MIPS32: # %bb.0: # %entry
66 ; MIPS32-NEXT: addiu $sp, $sp, -24
67 ; MIPS32-NEXT: .cfi_def_cfa_offset 24
68 ; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
69 ; MIPS32-NEXT: .cfi_offset 31, -4
70 ; MIPS32-NEXT: jal floor
72 ; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
73 ; MIPS32-NEXT: addiu $sp, $sp, 24
77 %0 = call double @llvm.floor.f64(double %a)