Based on https://github.com/llvm/llvm-project/commit/816d26fe5eeae4adcb0ceda05884747e15f55bb2, it seems the original intent of combineStoreToValueType is to avoid unnecessary bitcasts required to match ptr types of stores. Opaque pointers solves this issue, thus we should not perform this optimization on opaque stores. This optimization currently causes an issue since MergedLoadStoreMotion and SimplifyCFG optimizations are based on finding corresponding ops in different branches -- if the type of stores are conflicting, the optimizations will miss. We should probably not require type matching on memory ops in these passes, but we should first remove typed ptr handling where it is not needed.
Details
Details
- Reviewers
- None
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo