summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetBuiltins/ARM.cpp
AgeCommit message (Collapse)Author
2025-07-03[ARM] Add neon vector support for truncDavid Green
As per #142559, this marks ftrunc as legal for Neon and upgrades the existing arm.neon.vrintz intrinsics.
2025-07-02__sys builtin support for AArch64 (#146456)Adam Glass
Adds support for __sys Clang builtin for AArch64 __sys is a long existing MSVC intrinsic used to manage caches, tlbs, etc by writing to system registers: * It takes a macro-generated constant and uses it to form the AArch64 SYS instruction which is MSR with op0=1. The macro drops op0 and expects the implementation to hardcode it to 1 in the encoding. * Volume use is in systems code (kernels, hypervisors, boot environments, firmware) * Has an unused return value due to MSVC cut/paste error Implementation: * Clang builtin, sharing code with Read/WriteStatusReg * Hardcodes the op0=1 * Explicitly returns 0 * Code-format change from clang-format * Unittests included * Not limited to MSVC-environment as its generally useful and neutral
2025-07-01[ARM] Add neon vector support for ceilDavid Green
As per #142559, this marks fceil as legal for Neon and upgrades the existing arm.neon.vrintp intrinsics.
2025-06-30[ARM] Add neon vector support for roundDavid Green
As per #142559, this marks fround as legal for Neon and upgrades the existing arm.neon.vrinta intrinsics.
2025-06-29[ARM] Add neon vector support for floor (#142559)David Green
This marks ffloor as legal providing that armv8 and neon is present (or fullfp16 for the fp16 instructions). The existing arm_neon_vrintm intrinsics are auto-upgraded to llvm.floor. If this is OK I will update the other vrint intrinsics.
2025-06-25InterlockedAdd_*, InterlockedAdd64_* support for AArch64 (#145607)Adam Glass
This PR adds support for InterlockedAdd_{acq, nf, rel}, and InterlockedAdd64_{acq, nf, rel} for Aarch64.
2025-06-21[CodeGen] Use range-based for loops (NFC) (#145142)Kazu Hirata
2025-06-10[NFC][LLVM] Refactor IRBuilder::Create{VScale,ElementCount,TypeSize}. (#142803)Paul Walker
CreateVScale took a scaling parameter that had a single use outside of IRBuilder with all other callers having to create a redundant ConstantInt. To work round this some code perferred to use CreateIntrinsic directly. This patch simplifies CreateVScale to return a call to the llvm.vscale() intrinsic and nothing more. As well as simplifying the existing call sites I've also migrated the uses of CreateIntrinsic. Whilst IRBuilder used CreateVScale's scaling parameter as part of the implementations of CreateElementCount and CreateTypeSize, I have follow-on work to switch them to the NUW varaiety and thus they would stop using CreateVScale's scaling as well. To prepare for this I have moved the multiplication and constant folding into the implementations of CreateElementCount and CreateTypeSize. As a final step I have replaced some callers of CreateVScale with CreateElementCount where it's clear from the code they wanted the latter.
2025-05-15[Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (#128019)Lukacma
This patch adds fp8 variants to existing intrinsics, whose operation doesn't depend on arguments being a specific type. It also changes mfloat8 type representation in memory from `i8` to `<1xi8>`
2025-05-02[IRBuilder] Add versions of createInsertVector/createExtractVector that take ↵Craig Topper
a uint64_t index. (#138324) Most callers want a constant index. Instead of making every caller create a ConstantInt, we can do it in IRBuilder. This is similar to createInsertElement/createExtractElement.
2025-04-03[CodeGen] Don't include CGDebugInfo.h in CodeGenFunction.h (NFC) (#134100)Nikita Popov
This is an expensive header, only include it where needed. Move some functions out of line to achieve that. This reduces time to build clang by ~0.5% in terms of instructions retired.
2025-04-01[AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate ↵Lukacma
(#127043) Currently arm_neon.h emits C-style casts to do vector type casts. This relies on implicit conversion between vector types to be enabled, which is currently deprecated behaviour and soon will disappear. To ensure NEON code will keep working afterwards, this patch changes all this vector type casts into bitcasts. Co-authored-by: Momchil Velikov <momchil.velikov@arm.com>
2025-03-26[NFC][clang] Remove superfluous header files after refactor in #132252 (#132495)Jonathan Thackray
Remove superfluous header files after refactor in #132252
2025-03-21[NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific ↵Jonathan Thackray
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.