https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108031
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |smunnangi1 at
ventanamicro dot com
--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
With 124741 resolved, Shreya should start working on this shortly.
As I've noted to Shreya privately, I think the path forward here is two steps.
For atomics where we have just an "A" constraint, review to confirm the
instruction doesn't allow offsets in the memory reference. This is expected to
catch things like amoadd. We want to create a new operand predicate which only
allows (mem (reg)) memory references and use it for those cases. Essentially
making the operand predicate and constraint match in what they accept.
That's necessary to expose the address calculations to CSE. This is an
indepedent step that stands on its own.
--
Step 2 requires fixing the costing model. I don't remember the exact values,
but it looked like we mis-costed the address computation and as a result CSE
didn't think it was profitable to optimize the address calculations.