| commit | 916e8f74a8216e858699fc8533929c013fa3d018 | [log] [tgz] |
|---|---|---|
| author | Ryotaro Kasuga <kasuga.ryotaro@fujitsu.com> | Fri Oct 31 01:06:30 2025 +0900 |
| committer | GitHub <noreply@github.com> | Thu Oct 30 16:06:30 2025 +0000 |
| tree | 7c756232ac160d08e65f5bddb23d6e3b1dfa2e3f | |
| parent | cc1022ca0bba0564fbfa1e194414593640d28852 [diff] |
[DA] Check nsw when extracting a constant operand of SCEVMul (#164408) Given a `SCEVMulExpr` such as `5 * %m`, `gcdMIVtest` in DA assumes the value as a multiple of 5 in a mathematical sense. However, this is not necessarily true if `5 * %m` overflows, especially because an odd number has an inverse modulo `2^64`. Such incorrect assumptions can lead to invalid analysis results. This patch stops unconditionally extracting a constant operand from `SCEVMulExpr`. Instead, it only allows this when the `SCEVMulExpr` has the `nsw` flag.
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.