This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine][OpaquePtr] Do not try to match store type to value type for opaque stores
AbandonedPublic

Authored by jrbyrnes on Mar 30 2023, 11:59 AM.

Details

Reviewers
None
Summary

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.

Diff Detail

Event Timeline

jrbyrnes created this revision.Mar 30 2023, 11:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:59 AM
jrbyrnes requested review of this revision.Mar 30 2023, 11:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:59 AM
jrbyrnes abandoned this revision.Mar 30 2023, 12:00 PM

Phab review not formatted the way I intended.