summaryrefslogtreecommitdiff
path: root/test/CodeGen/builtins-msp430.c
blob: 8fb409b66646d4fd04827cf9cae7728a33ddbc69 (plain)
1
2
3
4
5
6
7
8
9
10
// 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.flt.rounds()
  // CHECK-DAG: [[V1:[%A-Za-z0-9.]+]] = trunc i32 [[V0]] to i16
  // CHECK-DAG: ret i16 [[V1]]
  return __builtin_flt_rounds();
}