[PATCH] D126525: [SSAUpdaterImpl] Do not generate phi node with all the same incoming values

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 29 22:07:12 PDT 2022


skatkov added a comment.

In D126525#3544896 <https://reviews.llvm.org/D126525#3544896>, @sameerds wrote:

> In D126525#3544805 <https://reviews.llvm.org/D126525#3544805>, @skatkov wrote:
>
>> In D126525#3542391 <https://reviews.llvm.org/D126525#3542391>, @djtodoro wrote:
>>
>>> This is interesting! Can you please make a simple/dedicated LLVM IR case for this only, so we can go over the example to get the whole picture?
>>
>> llvm/test/CodeGen/AArch64/tail-dup-redundant-phi.mir is dedicated test for this patch and https://reviews.llvm.org/D126523. This test is not landed yet. I just uploaded it here as diff to show the difference.
>
> Even then, a target independent test in LLVM IR will certainly be useful.

That would be good but SSA Updater is not triggered directly as a pass. I found the motivation case in tailduplication codegen pass, so I've written it in mir format. Writing it in LLVM IR will just include a lot of other passes where the changes might disappear the case I'm testing. I though the more precise test is better than something general.

If you'd like I can try to create unittest triggering directly SSA Updater.


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

https://reviews.llvm.org/D126525



More information about the llvm-commits mailing list