public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/30841]  New: Missed optimizations for sbi/cbi instructions
@ 2007-02-18 13:03 aesok at gcc dot gnu dot org
  2007-02-19  6:53 ` [Bug rtl-optimization/30841] " bonzini at gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aesok at gcc dot gnu dot org @ 2007-02-18 13:03 UTC (permalink / raw)
  To: gcc-bugs

demo.c:
#define PORTD (*(volatile unsigned char *)(50))

int
main (void)
{
  PORTD |= 1;

  return 0;
}

Revision r118474:
.LM2:
 ; (insn 14 12 18 main.c:6 (set (mem/v:QI (const_int 50 [0x32]) [0 S1 A8])
 ;         (ior:QI (mem/v:QI (const_int 50 [0x32]) [0 S1 A8])
 ;             (const_int 1 [0x1]))) 114 {*sbi} (nil)
 ;     (nil))
        sbi 50-0x20,0    ;  14  *sbi    [length = 1]


Revision r118475:
.LM2:
 ; (insn 10 9 11 main.c:6 (set (reg/f:HI 30 r30 [44])
 ;         (const_int 50 [0x32])) 12 {*movhi} (nil)
 ;     (expr_list:REG_EQUIV (const_int 50 [0x32])
 ;         (nil)))
        ldi r30,lo8(50)  ;  10  *movhi/4        [length = 2]
        ldi r31,hi8(50)
 ; (insn 11 10 12 main.c:6 (set (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ;         (mem/v:QI (reg/f:HI 30 r30 [44]) [0 S1 A8])) 9 {*movqi}
(insn_list:REG_DEP_TRUE 10 (nil))
 ;     (nil))
        ld r24,Z         ;  11  *movqi/4        [length = 1]
 ; (insn 12 11 14 main.c:6 (set (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ;         (ior:QI (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ;             (const_int 1 [0x1]))) 47 {iorqi3} (insn_list:REG_DEP_TRUE 11
(nil))
 ;     (nil))
        ori r24,lo8(1)   ;  12  iorqi3/2        [length = 1]
 ; (insn 14 12 18 main.c:6 (set (mem/v:QI (reg/f:HI 30 r30 [44]) [0 S1 A8])
 ;         (reg:QI 24 r24 [orig:42 D.1514 ] [42])) 9 {*movqi}
(insn_list:REG_DEP_TRUE 12 (nil))
 ;     (expr_list:REG_DEAD (reg:QI 24 r24 [orig:42 D.1514 ] [42])
 ;         (expr_list:REG_DEAD (reg/f:HI 30 r30 [44])
 ;             (nil))))
        st Z,r24         ;  14  *movqi/3        [length = 1]

Revision 118475  
2006-11-03  Paolo Bonzini  <bonzini@gnu.org>
            Steven Bosscher  <stevenb.gcc@gmail.com>

        * fwprop.c: New file.
        * Makefile.in: Add fwprop.o.
        * tree-pass.h (pass_rtl_fwprop, pass_rtl_fwprop_with_addr): New.
        * passes.c (init_optimization_passes): Schedule forward propagation.
        * rtlanal.c (loc_mentioned_in_p): Support NULL value of the second
        parameter.
        * timevar.def (TV_FWPROP): New.
        * common.opt (-fforward-propagate): New.
        * opts.c (decode_options): Enable forward propagation at -O2.
        * gcse.c (one_cprop_pass): Do not run local cprop unless touching
jumps.
        * cse.c (fold_rtx_subreg, fold_rtx_mem, fold_rtx_mem_1, find_best_addr,
        canon_for_address, table_size): Remove.
        (new_basic_block, insert, remove_from_table): Remove references to
        table_size.
        (fold_rtx): Process SUBREGs and MEMs with equiv_constant, make
        simplification loop more straightforward by not calling fold_rtx
        recursively.
        (equiv_constant): Move here a small part of fold_rtx_subreg,
        do not call fold_rtx.  Call avoid_constant_pool_reference
        to process MEMs.
        * recog.c (canonicalize_change_group): New.
        * recog.h (canonicalize_change_group): New.

        * doc/invoke.texi (Optimization Options): Document fwprop.
        * doc/passes.texi (RTL passes): Document fwprop.

Anatoly.


-- 
           Summary: Missed optimizations for sbi/cbi instructions
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aesok at gcc dot gnu dot org
GCC target triplet: avr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30841


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-04-28  4:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-18 13:03 [Bug rtl-optimization/30841] New: Missed optimizations for sbi/cbi instructions aesok at gcc dot gnu dot org
2007-02-19  6:53 ` [Bug rtl-optimization/30841] " bonzini at gnu dot org
2007-02-22  8:27 ` bonzini at gnu dot org
2007-02-22 16:47 ` bonzini at gnu dot org
2007-02-23  7:45 ` bonzini at gcc dot gnu dot org
2007-03-20  8:31 ` [Bug rtl-optimization/30841] [4.3 regression] " bonzini at gcc dot gnu dot org
2007-03-20  8:32 ` bonzini at gnu dot org
2007-03-20 15:29 ` pinskia at gcc dot gnu dot org
2007-04-28  4:19 ` kargl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).