------- Additional Comments From bonzini at gcc dot gnu dot org 2005-08-18 13:46 ------- Sorry.
outcnt aliases with outbuf, so the load of t2 cannot be removed. The GIMPLE code that is now emitted is something like: void bi_windup(unsigned char *outbuf, unsigned char bi_buf) { int t1 = outcnt; outbuf[t1] = bi_buf; int t2 = outcnt; if (t2 == 16384) flush_outbuf(); int t3 = outcnt; outbuf[t3] = bi_buf; } where t3 == t2 if flush_outbuf is not called. My code removes the load into t3 if flush_outbuf is not called. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23455