[PATCH] D127726: [InstCombiner] Add option to replace PHI of GEPs with GEP with PHI as index

Elena Lepilkina via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 02:18:38 PDT 2022


eklepilkina added a comment.

Ok, I got your concerns about flag, I've checked the test-suite results also on X86 (they are attached below). There was no real regressions. Microbenchmarks results that are in top of regressions aren't reproducable and on other runs I've made they have another result. Of course, I have no opportunity to check all backends.

The second important question which was raised is connected with the first element of array. This modification works only when PHI contains GEPs and/or array that is used in these GEPs (please, have a look on negative tests). It seems that it's quite common case, there isn't always generated GEP for the first element of array. And I don't see the reason why we should ignore the first element. Of course, it's possible to generate the GEP instruction for the first element, but I amn't sure that this is worth to do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127726



More information about the llvm-commits mailing list