[PATCH] D131718: [HLSL] Add abs library function

2022-08-25 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18385cffc50a: [HLSL] Add abs library function (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131718/new/ https://reviews.llvm.org/D13171

[PATCH] D131718: [HLSL] Add abs library function

2022-08-24 Thread Justin Bogner via Phabricator via cfe-commits
bogner accepted this revision. bogner added a comment. This revision is now accepted and ready to land. LGTM. Make sure you update the description from saying that this doesn't handle half because of https://llvm.org/pr57100 to saying that it fixes the bug instead. Repository: rG LLVM Github

[PATCH] D131718: [HLSL] Add abs library function

2022-08-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6130 MarshallingInfoFlag>, ImpliedByAnyOf<[fnative_half_arguments_and_returns.KeyPath]>; def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, bob80905 wrote:

[PATCH] D131718: [HLSL] Add abs library function

2022-08-24 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/include/clang/Driver/Options.td:6130 MarshallingInfoFlag>, ImpliedByAnyOf<[fnative_half_arguments_and_returns.KeyPath]>; def fdefault_calling_conv_EQ : Joined<["-"], "fdefault-calling-conv=">, In Clang.cpp,

[PATCH] D131718: [HLSL] Add abs library function

2022-08-24 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added inline comments. Comment at: clang/test/CodeGenHLSL/builtins/abs.hlsl:20 + +// CHECK: define noundef double @"?abs_double@@YANN@Z"( +// CHECK: call double @llvm.fabs.f64(double %0) Is there a reason why we don't check the function parameter here, b

[PATCH] D131718: [HLSL] Add abs library function

2022-08-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 454962. beanz added a comment. Herald added a subscriber: MaskRay. Updating with a fix for half type parameters. This addresses the issue I filed here: https://github.com/llvm/llvm-project/issues/57100 The issue was caused by HLSL not implying options to allow

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 451974. beanz added a comment. Adding missing test coverage for 64-bit types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131718/new/ https://reviews.llvm.org/D131718 Files: clang/lib/Headers/hlsl/hlsl_intrin

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:17 +__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In); +__attribute__((clang_builtin_alias(__builtin_fabsf))) float abs(float In); +__attribute__((clang_builtin_alia

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: tex3d, python3kgae, bogner, pow2clk, bob80905. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This change exposes the abs library function for HLSL scalar