[PATCH] D82072: [InstCombine] Combile select & Phi by same condition

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 18:03:42 PDT 2020


aqjune added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp:2555
   // FIXME: Remove this workaround when freeze related patches are done.
   // For select with undef operand which feeds into an equality comparison,
   // don't simplify it so loop unswitch can know the equality comparison
----------------
spatel wrote:
> xbolva00 wrote:
> > @spatel can you look at this fixme?
> That was added with D35811.
> 
> I don't know exact status, but I think there are still several steps to go before we can start adding freeze instructions to IR early in the optimization pipeline and not cause perf regressions.
> 
> cc @aqjune @nlopes
I'll be able to work on addressing performance regressions happening from freeze insertions from the middle of July.
There are two things that I have in my mind: (1) we need a function attribute saying that the argument has a frozen value (I also suggested it at https://reviews.llvm.org/D81678 ), (2) we need to update InstCombine patterns to work well on frozen arguments too.
For the former one, I'm seeing how the patch goes; if it it goes into a different direction, I'll suggest a patch by myself. For the latter one, my plan is to enable insertion of freeze from the later-most instcombine/simplifycfg pass first, and see which optimization needs to be updated.


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

https://reviews.llvm.org/D82072





More information about the llvm-commits mailing list