commit | 8dc89e34199b6b1d0f5ea1f9940ccc8e957eef0a | [log] [tgz] |
---|---|---|
author | Paul Walker <paul.walker@arm.com> | Wed Apr 30 13:21:46 2025 +0100 |
committer | GitHub <noreply@github.com> | Wed Apr 30 13:21:46 2025 +0100 |
tree | ed14e31288af369a6fb045ef7eb9d8ad55740a12 | |
parent | 5b6fc610919cc2e88fe3d9bfcc23637c75a636c9 [diff] |
[LLVM][InstCombine] Enable constant folding for SVE asr,lsl and lsr intrinsics. (#137350) The SVE intrinsics support shift amounts greater-than-or-equal to the element type's bit-length, essentially saturating the shift amount to the bit-length. However, the IR instructions consider this undefined behaviour that results in poison. To account for this we now ignore the result of the simplifications that result in poison. This allows existing code to be used to simplify the shifts but does mean: 1) We don't simplify cases like "svlsl_s32(x, splat(32)) => 0". 2) We no longer constant fold cases like "svadd(poison, X) => poison" For (1) we'd need dedicated target specific combines anyway and the result of (2) is not specified by the ACLE and replicating LLVM IR behaviour might be confusing to ACLE writers.
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.