| commit | 552c0d14d13df8d05fc970425b806bc7e2ca9c8c | [log] [tgz] |
|---|---|---|
| author | Philip Reames <preames@rivosinc.com> | Thu Aug 28 10:49:46 2025 -0700 |
| committer | GitHub <noreply@github.com> | Thu Aug 28 10:49:46 2025 -0700 |
| tree | 16fea34ed41c495f6a91b186eb1bcb7a11d0dd4e | |
| parent | d254aed8dbdd73bc18c018a97009de3c40756ed3 [diff] |
[RISCV] Use XORI/SLLI/ADDI to when materializing select of constants (#155845) This case is the inverse of the one introduced in #155644. The complexity with the inversion is that we need to also invert the condition before shifting it. I had originally planned to only do so when the condition was "cheaply" invertible (i.e. didn't require the xori), but when looking more closely at the diffs I noticed that while the XORI prevents this from being an icount improvement, and actually lengthens slightly the critical path, it does still reduce the number of registers needed.
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.