commit | 08a8e1c6b62215bf0b410f297add76f4e3b068d7 | [log] [tgz] |
---|---|---|
author | Florian Hahn <flo@fhahn.com> | Mon Jul 14 22:01:03 2025 +0200 |
committer | GitHub <noreply@github.com> | Mon Jul 14 21:01:03 2025 +0100 |
tree | a8277528da9919fe4b137ae4bb5d9bf6010b8505 | |
parent | 2edd4a25dd0bb4e5f49ce0d5ff8a95803ac88d27 [diff] |
[InstCombine] Move extends across identity shuffles. (#146901) Add a new fold to instcombine to move SExt/ZExt across identity shuffles, applying the cast after the shuffle. This sinks extends and can enable more general additional folding of both shuffles (and related instructions) and extends. If backends prefer splitting up doing casts first, the extends can be hoisted again in VectorCombine for example. A larger example is included in the load_i32_zext_to_v4i32. The wider extend is easier to compute an accurate cost for and targets (like AArch64) can lower a single wider extend more efficiently than multiple separate extends. This is a generalization of a VectorCombine version (https://github.com/llvm/llvm-project/pull/141109) as suggested by @preames. PR: https://github.com/llvm/llvm-project/pull/146901
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.