On 7/23/22 03:26, Roger Sayle wrote:
This patch is a one line correction/clarification to GCC's current RTL documentation that explains a USE of a MEM is permissible. PR rtl-optimization/99930 is an interesting example on x86_64 where the backend generates better code when a USE is a (const) MEM than when it is a REG. In fact the backend relies on CSE to propagate the MEM (a constant pool reference) into the USE, to enable combine to merge/simplify instructions. This change has been tested with a make bootstrap, but as it might provoke a discussion, I've decided to not consider it "obvious". Ok for mainline (to document the actual current behavior)? 2022-07-23 Roger Sayle <ro...@nextmovesoftware.com> gcc/ChangeLog * doc/rtl.texi (use): Document that the operand may be a MEM.
Given this is documenting existing behavior and it's not hard to envision the MEM being useful in this context. OK.
jeff