[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl closed https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Damyan Pepper via cfe-commits
damyanp wrote: > This chane reuses llvms existing intrinsic `__builtin_elementwise_round`\ > `int_round` I suspect a typo - `chane` -> `change`? https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
@@ -831,6 +831,40 @@ uint64_t3 reversebits(uint64_t3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse) uint64_t4 reversebits(uint64_t4); +//===--===// +// frac builtins

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83570 >From ca14584d500752215b922e18743a503ea7f323bc Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 29 Feb 2024 21:48:47 -0500 Subject: [PATCH] [HLSL][DXIL] Implementation of round intrinsic hlsl_intrinsics.h

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 5b6e58c565cf809e4133a10ff9d9b096754bea1e f9e5cf8043dffc0c9fc94a8768b25111664311dd --

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/83570 >From f9e5cf8043dffc0c9fc94a8768b25111664311dd Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 29 Feb 2024 21:48:47 -0500 Subject: [PATCH] [HLSL][DXIL] Implementation of round intrinsic hlsl_intrinsics.h

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for round are generated for float and half. +; CHECK:call float @dx.op.unary.f32(i32 26, float %{{.*}}) +; CHECK:call half @dx.op.unary.f16(i32 26, half %{{.*}}) +

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for round are generated for float and half. +; CHECK:call float @dx.op.unary.f32(i32 26, float %{{.*}}) +; CHECK:call half @dx.op.unary.f16(i32 26, half %{{.*}}) +

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for round are generated for float and half. +; CHECK:call float @dx.op.unary.f32(i32 26, float %{{.*}}) +; CHECK:call half @dx.op.unary.f16(i32 26, half %{{.*}}) +

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -220,6 +220,9 @@ def Sin : DXILOpMapping<13, unary, int_sin, "Returns sine(theta) for theta in radians.">; def UMax : DXILOpMapping<39, binary, int_umax, "Unsigned integer maximum. UMax(a,b) = a > b ? a : b">; +def Round :

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -831,6 +831,40 @@ uint64_t3 reversebits(uint64_t3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse) uint64_t4 reversebits(uint64_t4); +//===--===// +// frac builtins

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for round are generated for float and half. +; CHECK:call float @dx.op.unary.f32(i32 26, float %{{.*}}) +; CHECK:call half @dx.op.unary.f16(i32 26, half %{{.*}}) +

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy approved this pull request. A few simple suggestions. Otherwise looks good. https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread S. Bharadwaj Yadavalli via cfe-commits
https://github.com/bharadwajy edited https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Xiang Li via cfe-commits
@@ -831,6 +831,40 @@ uint64_t3 reversebits(uint64_t3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_bitreverse) uint64_t4 reversebits(uint64_t4); +//===--===// +// frac builtins python3kgae

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/83570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-directx Author: Farzon Lotfi (farzonl) Changes hlsl_intrinsics.h - add the round api DXIL.td add the llvm intrinsic to DXIL lowering mapping This chane reuses llvms existing `__builtin_elementwise_round`\`int_round`

[clang] [llvm] [HLSL][DXIL] Implementation of round intrinsic (PR #83570)

2024-03-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl created https://github.com/llvm/llvm-project/pull/83570 hlsl_intrinsics.h - add the round api DXIL.td add the llvm intrinsic to DXIL lowering mapping This chane reuses llvms existing `__builtin_elementwise_round`\`int_round` This change implements: #70077 >From