11 Commits

Author SHA1 Message Date
Lei Huang
bf85f52fbd
[PowerPC] Update dmr builtin names (#183160)
Remove `_mma` from the following built-ins as they are not related to
MMA:

* __builtin_mma_dmsetdmrz
* __builtin_mma_dmmr
* __builtin_mma_dmxor
* __builtin_mma_build_dmr
* __builtin_mma_disassemble_dmr

AI Assisted.
2026-03-12 12:54:07 -04:00
Maryam Moghadas
f7a48fbefa
[PowerPC] Add AMO load with Compare and Swap Not Equal (#178061)
This commit adds support for lwat/ldat atomic operations with function
code 16 (Compare and Swap Not Equal) via 4 clang builtins:

__builtin_amo_lwat_csne for 32-bit unsigned operations 
__builtin_amo_ldat_csne for 64-bit unsigned operations
 __builtin_amo_lwat_csne_s for 32-bit signed operations 
__builtin_amo_ldat_csne_s for 64-bit signed operations
2026-03-09 13:50:08 -04:00
Maryam Moghadas
196548988e
[PowerPC] Add support for AMO store builtins (#170933)
This commit adds 4 Clang builtins for PowerPC AMO store operations:

__builtin_amo_stwat for 32-bit unsigned operations
__builtin_amo_stdat for 64-bit unsigned operations
__builtin_amo_stwat_s for 32-bit signed operations
__builtin_amo_stdat_s for 64-bit signed operations

and maps GCC's AMO store functions to these Clang builtins for
compatibility.
2026-01-19 10:58:32 -05:00
Maryam Moghadas
6f8a7e79db
[PowerPC] Add AMO load builtins for conditional increment/decrement (#169435)
This commit adds 4 Clang builtins for PowerPC AMO load conditional 
increment and decrement operations: 

 __builtin_amo_lwat_cond for 32-bit unsigned operations
 __builtin_amo_ldat_cond for 64-bit unsigned operations
 __builtin_amo_lwat_cond_s for 32-bit signed operations
 __builtin_amo_ldat_cond_s for 64-bit signed operations
2026-01-16 12:11:45 -05:00
Maryam Moghadas
325869c7fc
[PowerPC] Add AMO load signed builtins (#168747)
This commit adds two Clang builtins for AMO load signed operations:

__builtin_amo_lwat_s for 32-bit signed operations
__builtin_amo_ldat_s for 64-bit signed operations
2026-01-08 11:59:54 -05:00
Juan Manuel Martinez Caamaño
74d77dc2ec
[Clang][NFC] Rename UnqualPtrTy to DefaultPtrTy (#163207)
`UnqualPtrTy` didn't always match `llvm::PointerType::getUnqual`:
sometimes it returned a pointer that is not in address space 0 (notably
for SPIRV).

Since `UnqualPtrTy` was used as the "generic" or "default" pointer type,
this patch renames it to `DefaultPtrTy` to avoid confusion with LLVM's
`PointerType::getUnqual`.
2025-10-20 14:34:21 +02:00
Maryam Moghadas
ff14953128
[Clang][PowerPC] Add __dmr2048 type and DMF crypto builtins (#157152)
Define the __dmr2048 type to represent the DMR pair introduced by the
Dense Math Facility on PowerPC, and add three Clang builtins
corresponding to DMF cryptography:

__builtin_mma_dmsha2hash
__builtin_mma_dmsha3hash
__builtin_mma_dmxxshapad

The __dmr2048 type is required for the dmsha3hash crypto builtin, and,
as withother PPC MMA and DMR types, its use is strongly restricted.
2025-09-30 09:16:43 -04:00
RolandF77
d1cbe6ed74
[PowerPC] Add DMF builtins for build and disassemble (#153097)
Add support for PPC Dense Math builtins mma_build_dmr and
mma_disassemble_dmr builtins.
2025-08-25 12:14:55 -04:00
RolandF77
d9e21a92a7
[PowerPC] Add DMF basic builtins (#145372)
Add support for PPC Dense Math basic builtins dmsetdmrz, dmmr, dmxor.
2025-07-15 13:46:07 -04:00
Jonathan Thackray
a1a74c9e80
[NFC][clang] Remove superfluous header files after refactor in #132252 (#132495)
Remove superfluous header files after refactor in #132252
2025-03-26 14:45:00 +00:00
Jonathan Thackray
7f920e2e5f
[NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (#132252)
clang/lib/CodeGen/CGBuiltin.cpp is over 1MB long (>23k LoC), and can
take minutes to recompile (depending on compiler and host system) when
modified, and 5 seconds for clangd to update for every edit. Splitting
this file was discussed in this thread:

   https://discourse.llvm.org/t/splitting-clang-s-cgbuiltin-cpp-over-23k-lines-long-takes-1min-to-compile/

and the idea has received a number of +1 votes, hence this change.
2025-03-21 19:09:39 +00:00