mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 19:16:05 +00:00

Address the inconsistency between FLT_ROUNDS_ and SET_ROUNDING SDAG node. Rename FLT_ROUNDS_ to GET_ROUNDING and add llvm.get.rounding intrinsic to replace flt.rounds. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D139507
11 lines
356 B
C
11 lines
356 B
C
// REQUIRES: msp430-registered-target
|
|
// RUN: %clang_cc1 -triple msp430-unknown-unknown -emit-llvm %s -o - | FileCheck %s
|
|
|
|
int test_builtin_flt_rounds() {
|
|
// CHECK: [[V0:[%A-Za-z0-9.]+]] = call i32 @llvm.get.rounding()
|
|
// CHECK-DAG: [[V1:[%A-Za-z0-9.]+]] = trunc i32 [[V0]] to i16
|
|
// CHECK-DAG: ret i16 [[V1]]
|
|
return __builtin_flt_rounds();
|
|
}
|
|
|