Deric C.
b4ecebe745
[HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op ( #127137 )
...
Fixes #99205 .
- Implements the HLSL intrinsic `AddUint64` used to perform unsigned
64-bit integer addition by using pairs of unsigned 32-bit integers
instead of native 64-bit types
- The LLVM intrinsic `uadd_with_overflow` is used in the implementation
of `AddUint64` in `CGBuiltin.cpp`
- The DXIL op `UAddc` was defined in `DXIL.td`, and a lowering of the
LLVM intrinsic `uadd_with_overflow` to the `UAddc` DXIL op was
implemented in `DXILOpLowering.cpp`
Notes:
- `__builtin_addc` was not able to be used to implement `AddUint64` in
`hlsl_intrinsics.h` because its `CarryOut` argument is a pointer, and
pointers are not supported in HLSL
- A lowering of the LLVM intrinsic `uadd_with_overflow` to SPIR-V
[already
exists](https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/SPIRV/llvm-intrinsics/uadd.with.overflow.ll )
- When lowering the LLVM intrinsic `uadd_with_overflow` to the `UAddc`
DXIL op, the anonymous struct type `{ i32, i1 }` is replaced with a
named struct type `%dx.types.i32c`. This aspect of the implementation
may be changed when issue #113192 gets addressed
- Fixes issues mentioned in the comments on the original PR #125319
---------
Co-authored-by: Finn Plummer <50529406+inbelic@users.noreply.github.com>
Co-authored-by: Farzon Lotfi <farzonlotfi@microsoft.com>
Co-authored-by: Chris B <beanz@abolishcrlf.org>
Co-authored-by: Justin Bogner <mail@justinbogner.com>
2025-03-05 17:04:10 -08:00
..
2025-02-18 11:40:29 -08:00
2025-02-25 13:52:17 -08:00
2025-01-23 21:35:34 -08:00
2025-03-04 09:37:59 -08:00
2024-03-22 07:01:01 -04:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-26 13:40:11 -04:00
2024-08-20 16:33:25 -07:00
2024-11-22 10:23:30 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-10-18 21:16:50 +01:00
2024-11-06 11:32:07 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-08 16:56:05 -08:00
2025-01-21 17:33:45 -08:00
2024-12-19 12:17:21 -07:00
2025-01-12 18:52:20 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-20 16:33:25 -07:00
2025-02-26 09:43:30 -08:00
2025-02-26 09:43:30 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-02-25 16:09:41 -05:00
2025-01-21 17:33:45 -08:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-02-25 16:02:10 -08:00
2024-10-18 21:16:50 +01:00
2024-10-10 16:34:26 -07:00
2024-11-14 23:34:07 -08:00
2025-02-25 16:09:41 -05:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-15 12:16:52 +03:00
2024-05-13 18:50:16 -04:00
2024-08-02 15:13:16 -07:00
2024-09-12 15:53:50 -04:00
2024-11-06 11:32:07 -08:00
2025-01-21 17:33:45 -08:00
2024-09-12 15:53:50 -04:00
2025-01-21 17:33:45 -08:00
2024-10-17 12:54:52 -06:00
2024-12-02 12:08:14 -08:00
2024-10-17 12:54:52 -06:00
2024-10-17 12:54:52 -06:00
2025-01-21 17:33:45 -08:00
2025-01-15 15:36:50 -07:00
2025-01-15 15:36:50 -07:00
2024-11-06 07:31:39 -08:00
2024-11-06 07:31:39 -08:00
2024-11-18 13:56:33 -08:00
2024-12-18 16:33:49 -05:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2024-12-01 22:31:40 -08:00
2025-01-13 10:31:25 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-15 12:16:52 +03:00
2024-08-15 12:16:52 +03:00
2024-08-15 12:16:52 +03:00
2024-08-15 12:16:52 +03:00
2024-09-23 19:00:20 -04:00
2024-09-23 19:00:20 -04:00
2024-10-02 15:55:40 -04:00
2024-08-15 12:16:52 +03:00
2025-02-13 14:16:01 -08:00
2024-12-18 16:33:49 -05:00
2024-11-13 16:36:24 -05:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-11-06 11:32:07 -08:00
2025-01-21 17:33:45 -08:00
2024-10-18 21:16:50 +01:00
2024-10-18 21:16:50 +01:00
2024-10-17 12:54:52 -06:00
2024-03-28 12:32:28 -04:00
2024-10-02 15:55:40 -04:00
2024-10-07 10:33:35 -07:00
2025-01-08 16:56:05 -08:00
2025-01-08 16:56:05 -08:00
2025-01-12 18:52:20 -07:00
2025-01-12 18:52:20 -07:00
2025-01-07 07:18:54 -08:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-20 12:46:33 -04:00
2025-01-21 17:33:45 -08:00
2024-12-18 16:33:49 -05:00
2024-11-13 16:36:24 -05:00
2024-12-18 16:33:49 -05:00
2024-11-13 16:36:24 -05:00
2024-10-17 12:54:52 -06:00
2024-10-02 15:55:40 -04:00
2024-08-02 15:13:16 -07:00
2024-07-30 17:25:58 -04:00
2024-09-04 22:12:01 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-11-06 11:32:07 -08:00
2024-09-23 19:00:20 -04:00
2024-10-17 12:54:52 -06:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2024-08-02 15:13:16 -07:00
2025-01-21 17:33:45 -08:00
2024-09-23 19:00:20 -04:00
2025-03-05 17:04:10 -08:00
2025-03-05 17:04:10 -08:00
2024-08-20 16:33:25 -07:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-02-25 16:09:41 -05:00
2024-12-17 17:32:50 -05:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-27 23:26:56 -08:00
2025-01-16 10:35:23 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00
2025-01-21 17:33:45 -08:00