------- Comment #7 from steven at gcc dot gnu dot org 2006-01-02 21:30 ------- With an even more modified test case, load PRE does happen:
unsigned long outcnt; extern void flush_outbuf(void); void bi_windup(unsigned int *outbuf, unsigned int bi_buf, unsigned long *outcnt) { unsigned long t1 = *outcnt; outbuf[t1] = bi_buf; unsigned long t2 = *outcnt; if (t2 == 16384) flush_outbuf(); unsigned long t3 = *outcnt; outbuf[t3] = bi_buf; } --> .pre tree dump bi_windup (outbufD.1866, bi_bufD.1867, outcntD.1868) { unsigned intD.3 * prephitmp.26D.1925; unsigned intD.3 * pretmp.25D.1924; long unsigned intD.4 prephitmp.24D.1923; long unsigned intD.4 pretmp.23D.1922; unsigned intD.3 storetmp.22D.1921; long unsigned intD.4 t3D.1873; long unsigned intD.4 t2D.1872; long unsigned intD.4 t1D.1871; unsigned intD.3 * D.1879; unsigned intD.3 * D.1878; long unsigned intD.4 D.1877; unsigned intD.3 * D.1876; unsigned intD.3 * D.1875; long unsigned intD.4 D.1874; # BLOCK 2 freq:10000 # PRED: ENTRY [100.0%] (fallthru,exec) # VUSE <TMT.4D.1902_15>; t1D.1871_2 = *outcntD.1868_1; D.1874_3 = t1D.1871_2 * 4; D.1875_4 = (unsigned intD.3 *) D.1874_3; D.1876_6 = D.1875_4 + outbufD.1866_5; # TMT.5D.1903_17 = V_MAY_DEF <TMT.5D.1903_16>; *D.1876_6 = bi_bufD.1867_7; if (t1D.1871_2 == 16384) goto <L0>; else goto <L2>; # SUCC: 3 [26.2%] (true,exec) 5 [73.8%] (false,exec) # BLOCK 5 freq:7378 # PRED: 2 [73.8%] (false,exec) <L2>:; goto <bb 4> (<L1>); # SUCC: 4 [100.0%] (fallthru) # BLOCK 3 freq:2622 # PRED: 2 [26.2%] (true,exec) <L0>:; # TMT.4D.1902_19 = V_MAY_DEF <TMT.4D.1902_15>; # TMT.5D.1903_20 = V_MAY_DEF <TMT.5D.1903_17>; flush_outbuf (); # VUSE <TMT.4D.1902_19>; pretmp.23D.1922_23 = *outcntD.1868_1; pretmp.23D.1922_25 = pretmp.23D.1922_23 * 4; pretmp.25D.1924_27 = (unsigned intD.3 *) pretmp.23D.1922_25; pretmp.25D.1924_29 = outbufD.1866_5 + pretmp.25D.1924_27; # SUCC: 4 [100.0%] (fallthru,exec) # BLOCK 4 freq:10000 # PRED: 5 [100.0%] (fallthru) 3 [100.0%] (fallthru,exec) # prephitmp.26D.1925_30 = PHI <D.1876_6(5), pretmp.25D.1924_29(3)>; # prephitmp.26D.1925_28 = PHI <D.1875_4(5), pretmp.25D.1924_27(3)>; # prephitmp.24D.1923_26 = PHI <D.1874_3(5), pretmp.23D.1922_25(3)>; # prephitmp.24D.1923_24 = PHI <t1D.1871_2(5), pretmp.23D.1922_23(3)>; # TMT.5D.1903_14 = PHI <TMT.5D.1903_17(5), TMT.5D.1903_20(3)>; # TMT.4D.1902_13 = PHI <TMT.4D.1902_15(5), TMT.4D.1902_19(3)>; <L1>:; t3D.1873_9 = prephitmp.24D.1923_24; D.1877_10 = prephitmp.24D.1923_26; D.1878_11 = prephitmp.26D.1925_28; D.1879_12 = prephitmp.26D.1925_30; # TMT.5D.1903_18 = V_MAY_DEF <TMT.5D.1903_14>; *D.1879_12 = bi_bufD.1867_7; return; # SUCC: EXIT [100.0%] } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23455