------- Comment #2 from rguenth at gcc dot gnu dot org 2007-12-04 13:15 ------- The difference if I remove the gftp_transfer typedef from the dump after critical edge splitting is (good vs. bad):
- D.1477_21 = 0B; - *0B ={v} 0; + # VUSE <SMT.32_54, SMT.33_40> + D.1481_21 = *dest_19; + # SMT.32_41 = VDEF <SMT.32_54> + # SMT.33_42 = VDEF <SMT.33_40> + *D.1481_21 = 0; The first real difference is after may_alias recomputation after SRA, where despite same constraints the points-to solution for dest_1 is different: -dest_1, name memory tag: NMT.35, is dereferenced, points-to vars: { SMT.32 } +dest_1, name memory tag: NMT.35, is dereferenced, points-to vars: { SMT.32 SMT.33 } The IL shows this in <bb 8>: - # SMT.32_48 = PHI <SMT.32_54(3), SMT.32_44(7)> # argp$0$gpr_30 = PHI <argp$0$gpr_27(3), argp$0$gpr_28(7)> # argp$0$overflow_arg_area_24 = PHI <argp$0$overflow_arg_area_2(3), argp$0$overflow_arg_area_4(7)> - # SMT.33_29 = PHI <SMT.33_55(3), SMT.33_55(7)> + # SMT.33_29 = PHI <SMT.33_55(3), SMT.33_40(7)> # SFT.25_26 = PHI <SFT.25_53(3), SFT.25_25(7)> # SFT.22_23 = PHI <SFT.22_52(3), SFT.22_22(7)> # dest_1 = PHI <dest_50(3), dest_19(7)> numargs_20 = numargs_51 + -1; - # VUSE <SMT.32_48> - D.1477_21 = *dest_1; - # SMT.32_41 = VDEF <SMT.32_48> + # VUSE <SMT.32_54, SMT.33_29> + D.1481_21 = *dest_1; + # SMT.32_41 = VDEF <SMT.32_54> # SMT.33_42 = VDEF <SMT.33_29> - *D.1477_21 = 0; + *D.1481_21 = 0; and finally store_ccp in one case optimizes this to @@ -79,11 +93,8 @@ # SMT.32_44 = VDEF <SMT.32_54> *dest_19 = 0B; numargs_20 = numargs_51 + -1; - # VUSE <SMT.32_44> - D.1477_21 = *dest_19; - # SMT.32_41 = VDEF <SMT.32_44> - # SMT.33_42 = VDEF <SMT.33_55> - *D.1477_21 = 0; + D.1477_21 = 0B; + *0B ={v} 0; if (numargs_20 > 0) goto <bb 3>; else which avoids the ICE in SCCVN which looks like: #2 0x0000000000abf95e in vuses_compare (pa=0x2ba6ff3a3ba8, pb=0x2ba6ff3a3bb0) at /space/rguenther/src/svn/trunk/gcc/tree-vn.c:118 118 int sn = SSA_NAME_VERSION (vusea) - SSA_NAME_VERSION (vuseb); (gdb) print vusea $1 = (const tree) 0x2ba6ff392e10 (gdb) call debug_generic_expr (vusea) SMT.32 (gdb) call debug_generic_expr (vuseb) SMT.33_40 that is, one VUSE isn't in SSA form - but was inserted by PRE: (gdb) call debug_generic_expr (stmt) # VUSE <SMT.32, SMT.33_40> { SMT.32 SMT.33 } storetmp.46_60 = *dest_19 I suppose for some reason virtual operand pruning isn't doing the same for the inserted stmt as for the original stmt where the operands were copied from. Indeed, we have the appearant mismatch here (crited): # SMT.33_40 = VDEF <SMT.33_55> *dest_19 = 0B; .. # VUSE <SMT.32_54, SMT.33_40> D.1481_21 = *dest_19; -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |alias http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34334