[PATCH] D96881: Avoid Bitcast-GEP fusion for void pointers

mohammad hadi jooybar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 13:54:46 PST 2021


hjooybar2 added a comment.

@lebedev.ri
There is nothing wrong with `phi translation` and `MemoryDependencyAnalysis` to fix. This changeset is **not** introducing a new `InstCombine` to fix an issue in other passes. Current implementation of `InstCombine` is carelessly (without doing necessary checks) combine  instructions. This changeset merely prevent some of these unprofitable combines. It doesn't make sense to change other passes when the `instCombine` itself is introducing the problem.  Even without considering `MemoryDependencyAnalysis` there is no benefit in combining `bitcast` and `gep` in the testcase I added. This fusion will create a `GEP` that uses pure byte index instead of element index in a struct.


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

https://reviews.llvm.org/D96881



More information about the llvm-commits mailing list