Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / lib / builtins / floatuntidf.c
blob9abeacc30c3c3f6a20bad83e6902fab41a5bd666
1 //===-- floatuntidf.c - Implement __floatuntidf ---------------------------===//
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 __floatuntidf for the compiler_rt library.
11 //===----------------------------------------------------------------------===//
13 #include "int_lib.h"
15 #ifdef CRT_HAS_128BIT
17 #define SRC_U128
18 #define DST_DOUBLE
19 #include "int_to_fp_impl.inc"
21 // Returns: convert a to a double, rounding toward even.
23 // Assumption: double is a IEEE 64 bit floating point type
24 // tu_int is a 128 bit integral type
26 // seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm
27 // mmmm
29 COMPILER_RT_ABI double __floatuntidf(tu_int a) { return __floatXiYf__(a); }
31 #endif // CRT_HAS_128BIT