[all-commits] [llvm/llvm-project] 57c54b: [GVN] Add test for PR63019 (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jun 1 09:45:11 PDT 2023

  Branch: refs/heads/release/16.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 57c54b25929c138b6e933a56a8549a8d59913e75
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    A llvm/test/Transforms/GVN/pr63019.ll

  Log Message:
  [GVN] Add test for PR63019 (NFC)

(cherry picked from commit 4d64ffa94170eadd79954e2a5f13d1f1d16e9e2c)

  Commit: 42f2e6efd84464e2d02f2524b7feecb00efd6ab7
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-01 (Thu, 01 Jun 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/AliasAnalysis.h
    M llvm/test/Transforms/GVN/pr63019.ll

  Log Message:
  [AA] Fix comparison of AliasResults (PR63019)

Comparison between two AliasResults implicitly decayed to comparison
of AliasResult::Kind. As a result, MergeAliasResults() ended up
considering two PartialAlias results with different offsets as

Fix this by adding an operator== implementation. To stay
compatible with extensive use of comparisons between AliasResult
and AliasResult::Kind, add an overload for that as well, which
will ignore the offset. In the future, it would probably be a
good idea to remove these implicit decays to AliasResult::Kind
and add dedicated methods to check for specific AliasResult kinds.

Fixes https://github.com/llvm/llvm-project/issues/63019.

(cherry picked from commit 97f0e7b06e6b76fd85fb81b8c12eba2255ff1742)

Compare: https://github.com/llvm/llvm-project/compare/726af32b5cee...42f2e6efd844

More information about the All-commits mailing list