diff options
| author | Björn Pettersson <bjorn.a.pettersson@ericsson.com> | 2026-02-12 10:58:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-12 10:58:29 +0100 |
| commit | 6420099bcc62a09e002e500870216b2dd9d256a9 (patch) | |
| tree | 0b0a6312eb3c20fc8bbd07fb08c8def6791e4ae7 /lldb/source/Plugins/ObjectFile/Minidump | |
| parent | 847558e7feb4647f82cd3846ec4eef70b0b24f82 (diff) | |
| download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 | |
DAGCombiner can fold a chain of INSERT_VECTOR_ELT into a vector AND/OR
operation. This patch adds protection to avoid that we end up making the
vector more poisonous by freezing the source vector when the elements
that should be set to 0/-1 may be poison in the source vector.
The patch also fixes a bug in SimplifyDemandedVectorElts for
MUL/MULHU/MULHS/AND that could result in making the vector more
poisonous. Problem was that we skipped demanding elements from Op0 that
were known to be zero in Op1. But that could result in elements being
simplified into poison when simplifying Op0, and then the result would
be poison and not zero after the MUL/MULHU/MULHS/AND. The solution is to
defensively make sure that we demand all the elements originally
demanded also when simplifying Op0.
This bugs were found when analysing the miscompiles in
https://github.com/llvm/llvm-project/issues/179448
Main culprit in #179448 seems to have been the bug in DAGCombiner. The
bug in SimplifyDemandedVectorElts surfaced when fixing the DAGCombiner,
as that fix typically introduce the (AND (FREEZE x), y) pattern that
wasn't handled correctly in SimplifyDemandedVectorElts.
Also fixes #180409.
Also fixes #176682.
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/Minidump')
0 files changed, 0 insertions, 0 deletions
