Skip to content

Commit 91fd1b4

Browse files
authored
[HIP] Always add -fnative-half-arguments-and-returns cmdline option. (#113335)
This command-line option is now required while building the HIP applications (mainly for the host side) after we enabled __fp16 args and return values with patches D133885 & D145345.
1 parent dc5c044 commit 91fd1b4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8102,7 +8102,7 @@ def fnative_half_type: Flag<["-"], "fnative-half-type">,
81028102
def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,
81038103
HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">,
81048104
MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>,
8105-
ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>;
8105+
ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath, hip.KeyPath]>;
81068106
def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">,
81078107
HelpText<"Set default calling convention">,
81088108
Values<"cdecl,fastcall,stdcall,vectorcall,regcall,rtdcall">,

clang/test/SemaCUDA/fp16-arg-return.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %clang_cc1 -o - -triple amdgcn-amd-amdhsa -fcuda-is-device -fsyntax-only -verify %s
22
// RUN: %clang_cc1 -o - -triple spirv64-amd-amdhsa -fcuda-is-device -fsyntax-only -verify %s
3+
// RUN: %clang_cc1 -o - -triple x86_64-unknown-gnu-linux -fsyntax-only -verify -xhip %s
34

45
// expected-no-diagnostics
56

0 commit comments

Comments
 (0)