Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / builtin_Float16.c
blob099d2ad5697e34352775bd87759ac0904e9cac90
1 // RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-linux-pc -target-feature +avx512fp16 %s | FileCheck %s
2 // RUN: %clang_cc1 -emit-llvm -o - -triple spir-unknown-unknown %s | FileCheck %s
3 // RUN: %clang_cc1 -emit-llvm -o - -triple armv7a--none-eabi %s | FileCheck %s
4 // RUN: %clang_cc1 -emit-llvm -o - -triple aarch64-linux-gnu %s | FileCheck %s
6 void test_float16_builtins(void) {
7 volatile _Float16 res;
9 // CHECK: store volatile half 0xH7C00, ptr %res, align 2
10 res = __builtin_huge_valf16();
11 // CHECK: store volatile half 0xH7C00, ptr %res, align 2
12 res = __builtin_inff16();
13 // CHECK: store volatile half 0xH7E00, ptr %res, align 2
14 res = __builtin_nanf16("");
15 // CHECK: store volatile half 0xH7D00, ptr %res, align 2
16 res = __builtin_nansf16("");