Bug 39760 - register allocation costs are not well described on AVR
Summary: register allocation costs are not well described on AVR
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.0
: P5 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-14 08:34 UTC by Paolo Bonzini
Modified: 2017-07-27 13:00 UTC (History)
2 users (show)

See Also:
Host:
Target: avr-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-02-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2009-04-14 08:34:06 UTC
The same alternative can produce very different instruction sequences.  For example:

  if (compare_sign_p (insn))
    {
      if (l) *l = 1;
      return AS1 (tst,%B0);
    }
  if (reg_unused_after (insn, op)
      && compare_eq_p (insn))
    {
      /* Faster than sbiw if we can clobber the operand.  */
      if (l) *l = 1;
      return AS2 (or,%A0,%B0);
    }
  if (test_hard_reg_class (ADDW_REGS, op))
    {
      if (l) *l = 1;
      return AS2 (sbiw,%0,0);
    }
  if (l) *l = 2;
  return (AS2 (cp,%A0,__zero_reg__) CR_TAB
          AS2 (cpc,%B0,__zero_reg__));
Comment 1 Georg-Johann Lay 2013-02-20 08:50:58 UTC
Is this still an issue?

What's the problem with micro-optimizations?
Comment 2 Eric Gallager 2017-07-27 13:00:59 UTC
(In reply to Georg-Johann Lay from comment #1)
> Is this still an issue?
> 
> What's the problem with micro-optimizations?

I guess this is no longer an issue since reporter never responded despite this bug being marked WAITING; closing now