[all-commits] [llvm/llvm-project] 3db39e: [DAGCombiner] Fix dependency analysis in checkMerg...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Fri Feb 4 00:09:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3db39e74792d774c9d413710d690daf31b1d0d0c
      https://github.com/llvm/llvm-project/commit/3db39e74792d774c9d413710d690daf31b1d0d0c
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2022-02-04 (Fri, 04 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    A llvm/test/CodeGen/AArch64/aarch64-checkMergeStoreCandidatesForDependencies.ll

  Log Message:
  -----------
  [DAGCombiner] Fix dependency analysis in checkMergeStoreCandidatesForDependencies

In the aftermath of D116895 a problem was found in the analysis of
dependencies between store merge candidates in
checkMergeStoreCandidatesForDependencies, that is needed to avoid
the cycles are introduced in the DAG.

In the past it has been enough (or assumed to be enough) to start
scanning from non-chain operands when analysing the store merge
candidates for dependencies, assuming that the analysis of chain
dependencies performed when finding the candidates would cover
up for potential dependencies that exist involving the chain operands.
It was however discovered that one could end up with scenarios such
as descibed in the aarch64-checkMergeStoreCandidatesForDependencies.ll
test case, when the dependency between two stores is given by a mix
of chain operand dependencies and non-chain operand dependencies.

The fix in this patch make sure that we also account for chain operand
dependencies when doing the more elaborate analysis in
checkMergeStoreCandidatesForDependencies, no longer relying on that
the earlier check involving chain operands is enough.

Differential Revision: https://reviews.llvm.org/D118943




More information about the All-commits mailing list