aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/mtc/simple
diff options
context:
space:
mode:
authorBjörn Pettersson <bjorn.a.pettersson@ericsson.com>2026-02-12 10:58:29 +0100
committerGitHub <noreply@github.com>2026-02-12 10:58:29 +0100
commit6420099bcc62a09e002e500870216b2dd9d256a9 (patch)
tree0b0a6312eb3c20fc8bbd07fb08c8def6791e4ae7 /lldb/test/API/functionalities/mtc/simple
parent847558e7feb4647f82cd3846ec4eef70b0b24f82 (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[SelectionDAG] Make sure demanded lanes for AND/MUL-by-zero are frozen (#180727)HEADmain
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/test/API/functionalities/mtc/simple')
0 files changed, 0 insertions, 0 deletions