[all-commits] [llvm/llvm-project] 97f0e7: [AA] Fix comparison of AliasResults (PR63019)
Nikita Popov via All-commits
all-commits at lists.llvm.org
Wed May 31 06:04:23 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 97f0e7b06e6b76fd85fb81b8c12eba2255ff1742
https://github.com/llvm/llvm-project/commit/97f0e7b06e6b76fd85fb81b8c12eba2255ff1742
Author: Nikita Popov <npopov at redhat.com>
Date: 2023-05-31 (Wed, 31 May 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
equivalent.
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.
More information about the All-commits
mailing list