https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118320

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am trying to figure out if we should reject the STP or allow it. 

The reason why it fails in ldp_fusion1 (which is before RA) is because of this:
```
      // Punt on accesses relative to eliminable regs.  See the comment in
      // pair_fusion_bb_info::track_access for a detailed explanation of this.
      if (!reload_completed
          && (REGNO (base) == FRAME_POINTER_REGNUM
              || REGNO (base) == ARG_POINTER_REGNUM))
        continue;

```

This is why it works if you make b a pointer or a global variable is because
ldp_fusion1 will handle the situtation just fine and the 2 uses don't need to
be merged there as the psedu registers are different so the uses list still
includes 2 uses.

Reply via email to