LLVM 22.1.0 Release Notes¶
Introduction¶
This document contains the release notes for the LLVM Compiler Infrastructure, release 22.1.0. Here we describe the status of LLVM, including major improvements from the previous release, improvements in various subprojects of LLVM, and some of the current users of the code. All LLVM releases may be downloaded from the LLVM releases web site.
For more information about LLVM, including information about the latest release, please check out the main LLVM web site. If you have questions or comments, the Discourse forums is a good place to ask them.
Note that if you are reading this file from a Git checkout or the main LLVM web page, this document applies to the next release, not the current one. To see the release notes for a specific release, please see the releases page.
Non-comprehensive list of changes in this release¶
…
Changes to the LLVM IR¶
The
ptrtoaddrinstruction was introduced. This instruction returns the address component of a pointer type variable but unlikeptrtointdoes not capture provenance (#125687).The alignment argument of the
@llvm.masked.load,@llvm.masked.store,@llvm.masked.gatherand@llvm.masked.scatterintrinsics has been removed. Instead, thealignattribute should be placed on the pointer (or vector of pointers) argument.A
load atomicmay now be used with vector types on x86.Added
@llvm.reloc.noneintrinsic to emit null relocations to symbols. This emits an undefined symbol reference without adding any dedicated code or data to to bear the relocation.Added
modular-formatattribute to dynamically pull in aspects of libc format string function implementations from statically-linked libc’s based on the requirements of each call. Currently onlyfloatis supported; this can keep floating point support out of printf if it can be proven unused.Case values are no longer operands of
SwitchInst.Allow metadata to be attached to IFuncs.
Changes to LLVM infrastructure¶
On AIX, fixed the OS version in target triples on PASE.
On AIX, automatically raise soft memory limits to hard limits on tool startup (#167928).
Changes to building LLVM¶
Changes to TableGen¶
The
!getopand!setopbang operators have been removed in favor of!getdagopand!setdagop.
Changes to Interprocedural Optimizations¶
Added
-enable-machine-outliner={optimistic-pgo,conservative-pgo}to read profile data to guide the machine outliner (#154437).Fixed static resolution of indirect calls to versioned functions on AArch64, by separating unrelated caller versions which were previously mixed together. Also improved the accuracy of the algorithm for low version counts.
Changes to Vectorizers¶
Added initial support for copyable elements in SLP, which models copyable elements as add
, 0, i.e. uses identity constants for missing lanes. SLP vectorizer supports initial recognition of FMA/FMAD pattern
Changes to the AArch64 Backend¶
Assembler/disassembler support has been added for Armv9.7-A (2025) architecture extensions.
Assembler/disassembler support has been added for ‘Virtual Tagging Extension (vMTE)’ and ‘Permission Overlay Extension version 2 (POE2)’ Future Architecture Technologies extensions.
FEAT_TMEsupport has been removed, as it has been withdrawn from all future versions of the A-profile architecture.Added support for C1-Nano, C1-Pro, C1-Premium, and C1-Ultra CPUs.
Added support for Ampere1C cores.
Changes to the AMDGPU Backend¶
Removed
llvm.amdgcn.atomic.cond.sub.u32andllvm.amdgcn.atomic.csub.u32intrinsics. Users should use theatomicrmwinstruction withusub_condandusub_satinstead.
Changes to the ARM Backend¶
Changes to the AVR Backend¶
Changes to the DirectX Backend¶
Changes to the Hexagon Backend¶
Changes to the LoongArch Backend¶
RuntimeDyld now supports the
Largecode model for LoongArch64.The
PreserveMostcalling convention is now supported.An option named
loongarch-enable-merge-offsetis added to allow disabling theMergeBaseOffsetpass.A macro instruction named
udis added.la.absnow generatesR_LARCH_MARK_LArelocation.LASX and LSX conversion intrinsics are added.
Tail calls for
sretandbyvalfunctions are now supported.Always emit symbol-based relocations regardless of relaxation.
DWARF fission is now compatible with linker relaxations, allowing
-gsplit-dwarfand-mrelaxto be used together when building for the LoongArch platform.Improved LoongArch32 support by adding LA32R/LA32S relocations, PC-relative address materialization, and
call/tailmacro instructions.Assorted codegen improvements.
Changes to the MIPS Backend¶
Changes to the PowerPC Backend¶
halfnow uses a soft float ABI, which works correctly in more cases.Add
mtpidralias introduced in ISA3.0.Update
tlbieinstruction implementation for ISA3.0+.Update
strlen,strcpyandmemcmpto use milicode calls instead of library calls.Prototyped intrinsic for xvrlw and load/store with right length left-justified.
Prototyped Elliptic Curve Cryptography (ECC) Instructions.
Prototyped VSX Vector Integer Arithmetic Instructions.
Prototyped AES Acceleration Instructions.
Prototyped vector uncompress instructions.
Prototyped vector unpack instructions.
Prototyped 32-byte indexed paired load and store instructions.
Prototyped Context Switch instruction
mtlpl.Prototyped VSX rotate left word instruction.
Prototyped paddis.
Prototyped eTCE instructions.
Prototyped Dense Math Facility and DMR COPY support.
Implement the trampoline intrinsics and nest parameter for AIX.
Introduced a minimum threshold for the largest number of comparisons needed to trigger bit test generation during switch lowering.
Relax strictfp to constrain only
libmlibcalls, permitting non-FP optimizations.Use
bne-for atomic operations after store conditional.Consolidated predicate definitions into
PPC.td.Cleanup asm parser code to use template functions for the various versions of
getImm*Encoding()andis*Imm()used inPPCRegisterInfo.td.
Changes to the RISC-V Backend¶
The loop vectorizer now performs tail folding by default on RISC-V, which removes the need for a scalar epilogue loop. To restore the previous behaviour use
-prefer-predicate-over-epilogue=scalar-epilogue.llvm-objdumpnow has basic support for switching between disassembling code and data using mapping symbols such as$xand$d. Switching architectures using$xwith an architecture string suffix is not yet supported.Ssctr and Smctr extensions are no longer experimental.
Add support for Zvfbfa (Additional BF16 vector compute support)
Adds experimental support for the ‘Zibi` (Branch with Immediate) extension.
Add support for Zvfofp8min (OFP8 conversion extension)
Adds assembler support for the Andes
XAndesvsinth(Andes Vector Small Int Handling Extension).DWARF fission is now compatible with linker relaxations, allowing
-gsplit-dwarfand-mrelaxto be used together when building for the RISC-V platform.The Xqci Qualcomm uC Vendor Extension is no longer marked as experimental.
The Xqccmp Qualcomm Vendor Extension is no longer marked as experimental.
Changes to the WebAssembly Backend¶
halfnow uses a soft float lowering, which resolves various precision and bitcast issues.
The
wasm32-wasitarget has been renamed towasm32-wasip1. The old option is still recognized, though by default will emit a deprecation warning.
Changes to the Windows Target¶
-fpseudo-probe-for-profilingis now supported for COFF.
Changes to the X86 Backend¶
-mcpu=wildcatlakeis now supported.-mcpu=novalakeis now supported.
Changes to the OCaml bindings¶
The IR reader bindings renamed
parse_irtoparse_ir_bitcode_or_assemblyto clarify that the parser accepts both textual IR and bitcode. This rename is intentional to force existing code to update because the ownership semantics changed: the function no longer takes ownership of the input memory buffer.
Changes to the Python bindings¶
Changes to the C API¶
Add
LLVMGetOrInsertFunctionto get or insert a function, replacing the combination ofLLVMGetNamedFunctionandLLVMAddFunction.Allow
LLVMGetVolatileto work with any kind of Instruction.Add
LLVMConstFPFromBitsto get a constant floating-point value from an array of 64 bit values.Add
LLVMParseIRInContext2, which is equivalent toLLVMParseIRInContextbut does not take ownership of the inputLLVMMemoryBufferRef. This matches the underlying C++ API and avoids ownership surprises in language bindings and examples.Functions working on the global context have been deprecated. Use the functions that work on a specific context instead.
LLVMGetGlobalContext-> useLLVMContextCreatecontext insteadLLVMInt1Type->LLVMInt1TypeInContextLLVMInt8Type->LLVMInt8TypeInContextLLVMInt16Type->LLVMInt16TypeInContextLLVMInt32Type->LLVMInt32TypeInContextLLVMInt64Type->LLVMInt64TypeInContextLLVMInt128Type->LLVMInt128TypeInContextLLVMIntType->LLVMIntTypeInContextLLVMHalfType->LLVMHalfTypeInContextLLVMBFloatType->LLVMBFloatTypeInContextLLVMFloatType->LLVMFloatTypeInContextLLVMDoubleType->LLVMDoubleTypeInContextLLVMX86FP80Type->LLVMX86FP80TypeInContextLLVMFP128Type->LLVMFP128TypeInContextLLVMPPCFP128Type->LLVMPPCFP128TypeInContextLLVMStructType->LLVMStructTypeInContextLLVMVoidType->LLVMVoidTypeInContextLLVMLabelType->LLVMLabelTypeInContextLLVMX86AMXType->LLVMX86AMXTypeInContextLLVMConstString->LLVMConstStringInContext2LLVMConstStruct->LLVMConstStructInContextLLVMMDString->LLVMMDStringInContext2LLVMMDNode->LLVMMDNodeInContext2LLVMAppendBasicBlock->LLVMAppendBasicBlockInContextLLVMInsertBasicBlock->LLVMInsertBasicBlockInContextLLVMCreateBuilder->LLVMCreateBuilderInContextLLVMIntPtrType->LLVMIntPtrTypeInContextLLVMIntPtrTypeForAS->LLVMIntPtrTypeForASInContextLLVMParseBitcode->LLVMParseBitcodeInContext2LLVMParseBitcode2->LLVMParseBitcodeInContext2LLVMGetBitcodeModule->LLVMGetBitcodeModuleInContext2LLVMGetBitcodeModule2->LLVMGetBitcodeModuleInContext2
Add
LLVMGetSwitchCaseValueandLLVMSetSwitchCaseValueto get and set switch case values; switch case values are no longer operands of the instruction.
Changes to the CodeGen infrastructure¶
Changes to the Metadata Info¶
Changes to the Debug Info¶
Changes to the LLVM tools¶
llvm-profgennow supports decoding pseudo probe for COFF binaries.llvm-readelfnow dumps all hex format values in lower-case mode.Some code paths for supporting Python 2.7 in
llvm-lithave been removed.Support for
%Tin lit has been removed.Add
--save-statsoption tollcto save LLVM statistics to a file. Compatible with the Clang option.Add
--save-statsoption tooptto save LLVM statistics to a file. Compatible with the Clang option.llvm-configgained a new flag--quote-pathswhich quotes and escapes paths emitted on stdout, to account for spaces or other special characters in path. (#97305 <https://github.com/llvm/llvm-project/pull/97305>_).llvm-objdumpnow supports using--mcpu=helpand--mattr=helpwith the--tripleoption without requiring an input file or the-d(disassemble) flag.
Changes to LLDB¶
LLDB can now set breakpoints, show backtraces, and display variables when debugging Wasm with supported runtimes (WAMR and V8).
LLDB now has a Wasm platform, which can be configured to run WebAssembly binaries directly under a Wasm runtime. Configurable through the platform.plugin.wasm settings.
LLDB no longer stops processes by default when receiving SIGWINCH signals (window resize events) on Linux. This is the default on other Unix platforms. You can re-enable it using
process handle --notify=true --stop=true SIGWINCH.The
show-progresssetting, which became a NOOP with the introduction of the statusline, now defaults to off and controls using OSC escape codes to show a native progress bar in supporting terminals like Ghostty and ConEmu.The default PDB reader on Windows was changed from DIA to native, which uses LLVM’s PDB and CodeView support. You can switch back to the DIA reader with
settings set plugin.symbol-file.pdb.reader dia. Note that support for the DIA reader will be removed in a future version of LLDB.A
--verboseoption was added to theversioncommand. When--verboseis used, LLDB’s build configuration is included in the command’s output. This includes all the supported targets, along with the presence of (or lack of) optional features like XML parsing.LLDB now includes formatters for many types from the MSVC STL.
DIL (the new
frame variableimplementation) now uses ‘:’ as a bitfield extraction range character. ‘-’ is deprecated and will output an error when used.LLDB 22 is the last release supporting FreeBSD 13 and below. As a result, LLDB 23 will remove support for FreeBSD on MIPS64 and assume that FreeBSD targets have watchpoint support.
Changes to BOLT¶
Added support for lite mode on AArch64. It can be enabled with -lite=1. When used, BOLT avoids duplicating cold code by reusing the original code, which reduces output binary size.
Changes to Sanitizers¶
Support running TypeSanitizer with UndefinedBehaviourSanitizer.
TypeSanitizer no longer inlines all instrumentation by default. Added the
-f[no-]sanitize-type-outline-instrumentationflags to give users control over this behaviour.
Other Changes¶
Introduces the
AllocTokenpass, an instrumentation pass providing tokens to memory allocators enabling various heap organization strategies, such as heap partitioning.Integrated Distributed ThinLTO (DTLTO) aims to support distribution of ThinLTO backend compilations for any in-process ThinLTO invocation. To enable this, support for the ThinLTO cache (for incremental builds) has been added in this release, and support for additional input file types has been implemented.
Bitcode objects contained in static libraries and archives (e.g. libc.a) are now handled transparently by temporarily extracting referenced objects for distribution. When thin archives are used (supported since LLVM 21), no extraction is required.
DTLTO creates a number of temporary files during operation, which are now cleaned up correctly when the process exits abnormally, for example due to Ctrl+C or similar termination events.
A new DTLTO linker option, –thinlto-remote-compiler-prepend-arg, has been added to support multi-call LLVM drivers. This option allows specifying an additional argument to select the desired subcommand, for example
llvm clang ....Note that ELF and COFF remain the only supported platforms.
External Open Source Projects Using LLVM 22.1.0¶
A project…
Additional Information¶
A wide variety of additional information is available on the
LLVM web page, in particular in the
documentation section. The web page also contains
versions of the API documentation which is up-to-date with the Git version of
the source code. You can access versions of these documents specific to this
release by going into the llvm/docs/ directory in the LLVM tree.
If you have any questions or comments about LLVM, please feel free to contact us via the Discourse forums.
