This makes to workaround to PR30188 be more robust to code that uses structs.
In practice, this improves an optimization case in rustc and reduces in-the-wild Rust code size by 0.1%.
Differential D37821
[SimplifyCfg] Don't sink loads/stores to geps of allocas arielb1 on Sep 13 2017, 12:30 PM. Authored by
Details
Diff Detail Event TimelineComment Actions Yes, I know the "right" thing to do might be to make SROA smarter, but de-messing selects in this context is pretty hard. Comment Actions The test is broken, repaired: https://clang.godbolt.org/z/W3zcxP Unclear if the underlying issue from PR30188 is still there: https://clang.godbolt.org/z/x37hrf Comment Actions The current implementation already uses stripPointerCasts(), so probably this is no longer relevant. @xbolva00 any particular reason for the ping? Comment Actions Since you work with rust-lang, maybe you are interested in this patch. (Patch mentions improvements for rust code). If not relevant anymore, the patch should be abandoned/closed. |