1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel \
3 ; RUN: -verify-machineinstrs %s -o -| FileCheck %s
4 ; RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -global-isel \
5 ; RUN: -verify-machineinstrs %s -o -| FileCheck %s
7 declare float @llvm.ceil.f32(float)
8 define float @ceil_f32(float %a) {
9 ; CHECK-LABEL: ceil_f32:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: addiu $sp, $sp, -24
12 ; CHECK-NEXT: .cfi_def_cfa_offset 24
13 ; CHECK-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
14 ; CHECK-NEXT: .cfi_offset 31, -4
15 ; CHECK-NEXT: jal ceilf
17 ; CHECK-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
18 ; CHECK-NEXT: addiu $sp, $sp, 24
22 %0 = call float @llvm.ceil.f32(float %a)
26 declare double @llvm.ceil.f64(double)
27 define double @ceil_f64(double %a) {
28 ; CHECK-LABEL: ceil_f64:
29 ; CHECK: # %bb.0: # %entry
30 ; CHECK-NEXT: addiu $sp, $sp, -24
31 ; CHECK-NEXT: .cfi_def_cfa_offset 24
32 ; CHECK-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
33 ; CHECK-NEXT: .cfi_offset 31, -4
34 ; CHECK-NEXT: jal ceil
36 ; CHECK-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
37 ; CHECK-NEXT: addiu $sp, $sp, 24
41 %0 = call double @llvm.ceil.f64(double %a)
45 declare float @llvm.floor.f32(float)
46 define float @floor_f32(float %a) {
47 ; CHECK-LABEL: floor_f32:
48 ; CHECK: # %bb.0: # %entry
49 ; CHECK-NEXT: addiu $sp, $sp, -24
50 ; CHECK-NEXT: .cfi_def_cfa_offset 24
51 ; CHECK-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
52 ; CHECK-NEXT: .cfi_offset 31, -4
53 ; CHECK-NEXT: jal floorf
55 ; CHECK-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
56 ; CHECK-NEXT: addiu $sp, $sp, 24
60 %0 = call float @llvm.floor.f32(float %a)
64 declare double @llvm.floor.f64(double)
65 define double @floor_f64(double %a) {
66 ; CHECK-LABEL: floor_f64:
67 ; CHECK: # %bb.0: # %entry
68 ; CHECK-NEXT: addiu $sp, $sp, -24
69 ; CHECK-NEXT: .cfi_def_cfa_offset 24
70 ; CHECK-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill
71 ; CHECK-NEXT: .cfi_offset 31, -4
72 ; CHECK-NEXT: jal floor
74 ; CHECK-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload
75 ; CHECK-NEXT: addiu $sp, $sp, 24
79 %0 = call double @llvm.floor.f64(double %a)