[all-commits] [llvm/llvm-project] 0a8acd: [DAG] ComputeNumSignBits - ISD::EXTRACT_ELEMENT ne...
Miguel Saldivar via All-commits
all-commits at lists.llvm.org
Tue Aug 26 14:28:23 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a8acd2eb2aff0edd610fc3ec14b32bee446656f
https://github.com/llvm/llvm-project/commit/0a8acd2eb2aff0edd610fc3ec14b32bee446656f
Author: Miguel Saldivar <miguel.saldivar at hpe.com>
Date: 2025-08-26 (Tue, 26 Aug 2025)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
A llvm/test/CodeGen/AMDGPU/pr155452.ll
Log Message:
-----------
[DAG] ComputeNumSignBits - ISD::EXTRACT_ELEMENT needs to return at least 1 (#155455)
When going through the ISD::EXTRACT_ELEMENT case, `KnownSign - rIndex *
BitWidth`
could produce a negative. When a negative is produced, the lower bound
of the `std::clamp` is returned. Change that lower bound to one to avoid
potential underflows, because the expectation is that
`ComputeNumSignBits`
should always return at least 1.
Fixes #155452.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list