| commit | 8663c306e9b0e8492db66db62df61fac9694908a | [log] [tgz] |
|---|---|---|
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | Sat Jan 03 13:55:45 2026 +0000 |
| committer | GitHub <noreply@github.com> | Sat Jan 03 13:55:45 2026 +0000 |
| tree | 3cc87037e139c3095b8bb9d85df1bf1089c5a116 | |
| parent | 9b8addffa70cee5b2acc5454712d9cf78ce45710 [diff] |
[X86] Cleanup uses of "(BW-1) - LOG2(C)" --> "CLZ(C)" instead. NFC. (#174167) We know in both cases that the value `C` is a power-of-2 constant, so we know the "(BW-1) - LOG2(C)" can be more obviously represented as "CLZ(C)". In both places it occurs it also makes it much easier to understand what's being done: shift the single masked bit up to the MSB and then use SRA to splat it to all bits.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.