llvm-project/clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp
hyeongyu kim 1b1c8d83d3 [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default
Turning on `enable_noundef_analysis` flag allows better codegen by removing freeze instructions.
I modified clang by renaming `enable_noundef_analysis` flag to `disable-noundef-analysis` and turning it off by default.

Test updates are made as a separate patch: D108453

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D105169
2022-01-16 18:54:17 +09:00

17 lines
790 B
C++

// RUN: %clang_cc1 -emit-llvm -o - -triple arm-arm-none-eabi -fallow-half-arguments-and-returns %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - -triple aarch64-arm-none-eabi -fallow-half-arguments-and-returns %s | FileCheck %s
// Test name-mangling of __fp16 passed directly as a function argument
// (when that is permitted).
// CHECK: define {{.*}}void @_Z13fp16_argumentDh(half noundef %{{.*}})
void fp16_argument(__fp16 arg) {}
// Test name-mangling of __fp16 as a return type. The return type of
// fp16_return itself isn't mentioned in the mangled name, so to test
// this, we have to pass it a function pointer and make __fp16 the
// return type of that.
// CHECK: define {{.*}}void @_Z11fp16_returnPFDhvE(half ()* noundef %{{.*}})
void fp16_return(__fp16 (*func)(void)) {}