Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / lib / builtins / floatdisf.c
blob0bb88c5c518eeca50562f01c7abe48ea43b19e85
1 //===-- floatdisf.c - Implement __floatdisf -------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file implements __floatdisf for the compiler_rt library.
11 //===----------------------------------------------------------------------===//
13 // Returns: convert a to a float, rounding toward even.
15 // Assumption: float is a IEEE 32 bit floating point type
16 // di_int is a 64 bit integral type
18 // seee eeee emmm mmmm mmmm mmmm mmmm mmmm
20 #include "int_lib.h"
22 #define SRC_I64
23 #define DST_SINGLE
24 #include "int_to_fp_impl.inc"
26 COMPILER_RT_ABI float __floatdisf(di_int a) { return __floatXiYf__(a); }
28 #if defined(__ARM_EABI__)
29 #if defined(COMPILER_RT_ARMHF_TARGET)
30 AEABI_RTABI float __aeabi_l2f(di_int a) { return __floatdisf(a); }
31 #else
32 COMPILER_RT_ALIAS(__floatdisf, __aeabi_l2f)
33 #endif
34 #endif
36 #if defined(__MINGW32__) && defined(__arm__)
37 COMPILER_RT_ALIAS(__floatdisf, __i64tos)
38 #endif