On Tue, Feb 18, 2020 at 03:27:39AM -0600, Xionghu Luo wrote: > Store-merging pass should run twice, the reason is pass fre/pre will do > some kind of optimizations to instructions by: > 1. Converting the load from address to load from function arguments > (store_merging_30.c:foo1). > 2. Converting the byte access to BIT_FIELD_REF(store_merging_30.c:foo2). > 3. Other bitfield combinations or potential interference optimizations etc. > These optimizations will break the store chain, store-merging pass fails > to catch such kind of pattern so stores are not merged in middle end, > then consecutive stb/sth instructions(should be merged to stw) are emitted > finally.
This seems to be way too early, won't it e.g. stand in a way for SRA because it will make harder to break those appart again? Or anything that uses alias info and store-merging needs to use a conservative alias set? For constant stores into bitfields followed by loads I'm working on something ATM (PR93582). Jakub