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
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
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:
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,
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
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
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
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
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