[PATCH] D108635: [CGP] Fix the crash for combining address mode when having cyclic dependency

weiwei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 25 07:36:48 PDT 2021


wwei added a comment.

In D108635#2964494 <https://reviews.llvm.org/D108635#2964494>, @skatkov wrote:

> It seems that correct fix should be something different.
> The underlying idea of implementation is as follows:
> We built phi nodes to get, for example, base address in a point of usage. (in you example it is an offset).
> Now we try to find whether there are already existing phi nodes which provide us with the base.
> So we try to match all new phi nodes to already existed.
> The bug you found actually happened due to we tried to match new phi node to another new phi node and at the end it results in the bug.
>
> So I guess the better fix would be to just ignore new phi nodes when we try to map new phi node to old one.

@skatkov Thank you for the explanation,I have updated the patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108635/new/

https://reviews.llvm.org/D108635



More information about the llvm-commits mailing list