https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126147
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
During early analysis and IPA modref the summary looks fine, but then at DSE2
time it somehow got "bigger" (the summary got re-allocated). During late
modref we have
modref analyzing 'set_field1_and_field2/23' (ipa=0)
Past summary:
loads:
stores:
Base 0: alias set 1
Ref 0: alias set 1
access: Parm 0 param offset:0 offset:0 size:1 max_size:2
kills:
Parm 0 param offset:0 offset:0 size:2 max_size:2
but then:
- Analyzing load: MEM <unsigned char> [(struct bitfield *)b_2(D)]
- Recording base_set=1 ref_set=1 Parm 0 param offset:0 offset:0 size:8
max_size:8
- Analyzing store: MEM <unsigned char> [(struct bitfield *)b_2(D)]
- Recording base_set=1 ref_set=1 Parm 0 param offset:0 offset:0 size:8
max_size:8
- Recording kill
- modref done with result: tracked.
loads:
Base 0: alias set 1
Ref 0: alias set 1
access: Parm 0 param offset:0 offset:0 size:8 max_size:8
stores:
Base 0: alias set 1
Ref 0: alias set 1
access: Parm 0 param offset:0 offset:0 size:8 max_size:8
so something invalidated the IPA PTA info on the caller side which claims
the function only CLOBBERs, does not USE the argument, by transforming
this into RMW.
ISTR there's a duplicate PR for this.