[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #9 from pinskia at gmail dot com 2008-01-18 11:56 --- Subject: Re: [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures --- Comment #8 from dtemirbulatov at gmail dot com 2008-01-17 18:34 --- This regression happens after the SSA was merged in to the mainline Yes because of the gimplifier ... -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #10 from steven at gcc dot gnu dot org 2008-01-18 12:04 --- Re. comment 7: What does the initial RTL look like with GCC 3.3 and with a post tree-ssa compiler? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #11 from rguenth at gcc dot gnu dot org 2008-01-18 12:08 --- For 3.3-hammer I get (x86_64): ;; Function f (note 2 0 3 NOTE_INSN_DELETED) (note 3 2 4 NOTE_INSN_FUNCTION_BEG) (note 4 3 5 NOTE_INSN_DELETED) (note 5 4 6 NOTE_INSN_DELETED) (note 6 5 8 NOTE_INSN_DELETED) (insn 8 6 9 (nil) (set (reg/v:SI 58 [ anonymous ]) (const_int 0 [0x0])) -1 (nil) (nil)) (insn 9 8 10 (nil) (set (strict_low_part (subreg:QI (reg/v:SI 58 [ anonymous ]) 0)) (const_int 1 [0x1])) -1 (nil) (nil)) (insn 10 9 11 (nil) (set (reg:DI 59) (const_int 2 [0x2])) -1 (nil) (expr_list:REG_EQUAL (const_int 2 [0x2]) (nil))) (insn 11 10 13 (nil) (set (zero_extract:DI (subreg:DI (reg/v:SI 58 [ anonymous ]) 0) (const_int 8 [0x8]) (const_int 8 [0x8])) (reg:DI 59)) -1 (nil) (nil)) (insn 13 11 14 (nil) (parallel [ (set (reg/v:SI 58 [ anonymous ]) (and:SI (reg/v:SI 58 [ anonymous ]) (const_int -16711681 [0xff00]))) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) (insn 14 13 16 (nil) (parallel [ (set (reg/v:SI 58 [ anonymous ]) (ior:SI (reg/v:SI 58 [ anonymous ]) (const_int 196608 [0x3]))) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) (insn 16 14 17 (nil) (parallel [ (set (reg/v:SI 58 [ anonymous ]) (and:SI (reg/v:SI 58 [ anonymous ]) (const_int 16777215 [0xff]))) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) (insn 17 16 18 (nil) (parallel [ (set (reg/v:SI 58 [ anonymous ]) (ior:SI (reg/v:SI 58 [ anonymous ]) (const_int 67108864 [0x400]))) (clobber (reg:CC 17 flags)) ]) -1 (nil) (nil)) (insn 18 17 19 (nil) (set (mem/s:SI (symbol_ref:DI (u)) [2 u+0 S4 A8]) (reg/v:SI 58 [ anonymous ])) -1 (nil) (nil)) (note 19 18 21 NOTE_INSN_FUNCTION_END) (code_label 21 19 0 1 [0 uses]) while on the trunk I see: ;; Function f (f) ;; ;; Full RTL generated for this function: ;; (note 1 0 3 NOTE_INSN_DELETED) ;; Start of basic block ( 0) - 2 ;; Pred edge ENTRY [100.0%] (fallthru) (note 3 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) (note 2 3 4 2 NOTE_INSN_FUNCTION_BEG) ;; End of basic block 2 - ( 3) ;; Succ edge 3 [100.0%] (fallthru) ;; Start of basic block ( 2) - 3 ;; Pred edge 2 [100.0%] (fallthru) (note 4 2 5 3 [bb 3] NOTE_INSN_BASIC_BLOCK) (insn 5 4 6 3 t.c:12 (set (reg/f:DI 58) (symbol_ref:DI (u) var_decl 0x2b813a2b8460 u)) -1 (nil)) (insn 6 5 7 3 t.c:12 (set (mem/s/c:QI (reg/f:DI 58) [0 u.a+0 S1 A8]) (const_int 1 [0x1])) -1 (nil)) (insn 7 6 8 3 t.c:12 (set (reg/f:DI 59) (const:DI (plus:DI (symbol_ref:DI (u) var_decl 0x2b813a2b8460 u) (const_int 1 [0x1] -1 (nil)) (insn 8 7 9 3 t.c:12 (set (mem/s/c:QI (reg/f:DI 59) [0 u.b+0 S1 A8]) (const_int 2 [0x2])) -1 (nil)) (insn 9 8 10 3 t.c:12 (set (reg/f:DI 60) (const:DI (plus:DI (symbol_ref:DI (u) var_decl 0x2b813a2b8460 u) (const_int 2 [0x2] -1 (nil)) (insn 10 9 11 3 t.c:12 (set (mem/s/c:QI (reg/f:DI 60) [0 u.c+0 S1 A8]) (const_int 3 [0x3])) -1 (nil)) (insn 11 10 12 3 t.c:12 (set (reg/f:DI 61) (const:DI (plus:DI (symbol_ref:DI (u) var_decl 0x2b813a2b8460 u) (const_int 3 [0x3] -1 (nil)) (insn 12 11 17 3 t.c:12 (set (mem/s/c:QI (reg/f:DI 61) [0 u.d+0 S1 A8]) (const_int 4 [0x4])) -1 (nil)) ;; End of basic block 3 - ( 4) ;; Succ edge 4 [100.0%] (fallthru) ;; Start of basic block ( 3) - 4 ;; Pred edge 3 [100.0%] (fallthru) (note 17 12 14 4 [bb 4] NOTE_INSN_BASIC_BLOCK) (jump_insn 14 17 15 4 t.c:13 (set (pc) (label_ref 16)) -1 (nil)) ;; End of basic block 4 - ( 6) ;; Succ edge 6 [100.0%] (barrier 15 14 13) ;; Start of basic block () - 5 (code_label 13 15 18 5 1 [0 uses]) (note 18 13 16 5 [bb 5] NOTE_INSN_BASIC_BLOCK) ;; End of basic block 5 - ( 6) ;; Succ edge 6 [100.0%] (fallthru) ;; Start of basic block ( 4 5) - 6 ;; Pred edge 4 [100.0%] ;; Pred edge 5 [100.0%] (fallthru) (code_label 16 18 19 6 2 [1 uses]) (note 19 16 0 6 [bb 6] NOTE_INSN_BASIC_BLOCK) ;; End of basic block 6 - ( 1) ;; Succ edge EXIT [100.0%] (fallthru) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #13 from rguenth at gcc dot gnu dot org 2008-01-18 12:45 --- Right. You also need to watch for TBAA problems in the RTL you create. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added Component|ada |middle-end http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #7 from rguenth at gcc dot gnu dot org 2008-01-17 15:47 --- Still broken (IMHO rightfully P2). With 3.3 we get (x86_64): f: .LFB3: movl$67305985, u(%rip) ret while on trunk we have: f: .LFB2: movb$1, u(%rip) movb$2, u+1(%rip) movb$3, u+2(%rip) movb$4, u+3(%rip) ret regardless of optimization flag (same for -Os and -O). Gimplification now produces f () { u.a = 1; u.b = 2; u.c = 3; u.d = 4; } which makes the task of combining the initializer even harder. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added CC||rguenth at gcc dot gnu dot ||org Last reconfirmed|2007-12-16 23:57:26 |2008-01-17 15:47:39 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #8 from dtemirbulatov at gmail dot com 2008-01-17 18:34 --- This regression happens after the SSA was merged in to the mainline -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
--- Comment #6 from steven at gcc dot gnu dot org 2007-12-16 23:17 --- Open regression with no activity since February 14. Ping? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141
[Bug middle-end/22141] [4.0/4.1/4.2/4.3 Regression] Missing optimization when storing structures
-- mmitchel at gcc dot gnu dot org changed: What|Removed |Added Target Milestone|4.1.2 |4.1.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141