brintos

brintos / llvm-project-archived public Read only

0
0
Text · 767 B · 099d2ad Raw
18 lines · c
1// RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-linux-pc -target-feature +avx512fp16 %s | FileCheck %s2// RUN: %clang_cc1 -emit-llvm -o - -triple spir-unknown-unknown %s | FileCheck %s3// RUN: %clang_cc1 -emit-llvm -o - -triple armv7a--none-eabi %s | FileCheck %s4// RUN: %clang_cc1 -emit-llvm -o - -triple aarch64-linux-gnu %s | FileCheck %s5 6void test_float16_builtins(void) {7  volatile _Float16 res;8 9  // CHECK: store volatile half 0xH7C00, ptr %res, align 210  res = __builtin_huge_valf16();11  // CHECK: store volatile half 0xH7C00, ptr %res, align 212  res = __builtin_inff16();13  // CHECK: store volatile half 0xH7E00, ptr %res, align 214  res = __builtin_nanf16("");15  // CHECK: store volatile half 0xH7D00, ptr %res, align 216  res = __builtin_nansf16("");17}18