[SROA] Fix bug where RankVectorTypes is used in std::unique
authorHan Zhu <zhuhan7737@gmail.com>
Thu, 16 Feb 2023 23:19:50 +0000 (15:19 -0800)
committerHan Zhu <zhuhan7737@gmail.com>
Tue, 7 Mar 2023 22:10:58 +0000 (14:10 -0800)
commitd888496e3c54f40e37db8ad273dff2456aad671d
tree23598b531a402497be69d023a3accf650f4ce06a
parent657d297a92aed929d37c8d7b148a6e848bc182df
[SROA] Fix bug where RankVectorTypes is used in std::unique

`RankVectorTypes` is a not an equivalence relation so when it is used in
`std::unique`, the behavior is undefined. Create `RankVectorTypesEq` and use
that instead.
llvm/lib/Transforms/Scalar/SROA.cpp
llvm/test/Transforms/SROA/sroa-common-type-fail-promotion.ll