Author: Christudasan Devadasan Date: 2024-10-22T22:07:35+05:30 New Revision: 91fd1b4f32206267f6b9ce0dc4977d62ef227151
URL: https://github.com/llvm/llvm-project/commit/91fd1b4f32206267f6b9ce0dc4977d62ef227151 DIFF: https://github.com/llvm/llvm-project/commit/91fd1b4f32206267f6b9ce0dc4977d62ef227151.diff LOG: [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. Added: Modified: clang/include/clang/Driver/Options.td clang/test/SemaCUDA/fp16-arg-return.cu Removed: ################################################################################ diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 152c43d7908ff8..bec53cf93254ca 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -8102,7 +8102,7 @@ def fnative_half_type: Flag<["-"], "fnative-half-type">, def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">, HelpText<"Use the native __fp16 type for arguments and returns (and skip ABI-specific lowering)">, MarshallingInfoFlag<LangOpts<"NativeHalfArgsAndReturns">>, - ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath]>; + ImpliedByAnyOf<[open_cl.KeyPath, render_script.KeyPath, hlsl.KeyPath, hip.KeyPath]>; def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, HelpText<"Set default calling convention">, Values<"cdecl,fastcall,stdcall,vectorcall,regcall,rtdcall">, diff --git a/clang/test/SemaCUDA/fp16-arg-return.cu b/clang/test/SemaCUDA/fp16-arg-return.cu index 9347491caa97b9..b02c6662318496 100644 --- a/clang/test/SemaCUDA/fp16-arg-return.cu +++ b/clang/test/SemaCUDA/fp16-arg-return.cu @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -o - -triple amdgcn-amd-amdhsa -fcuda-is-device -fsyntax-only -verify %s // RUN: %clang_cc1 -o - -triple spirv64-amd-amdhsa -fcuda-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -o - -triple x86_64-unknown-gnu-linux -fsyntax-only -verify -xhip %s // expected-no-diagnostics _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits