From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Hainque To: Richard Henderson Cc: Franz.Sirl-kernel@lauterbach.com, gcc@gcc.gnu.org Subject: Re: Problem with recent fixes in loop_iterations ? Date: Thu, 29 Nov 2001 01:35:00 -0000 Message-ID: References: <20011127135333.C30114@redhat.com> X-SW-Source: 2001-11/msg01534.html Message-ID: <20011129013500.tyjbQ7_qV8xiV9p3bB_0TXrnDOaeBuclTR-T1euxDrY@z> Richard Henderson writes: > The test must be refined a good deal to deal with a switch statement. > Probably you should notice the ADDR_VEC | ADDR_DIFF_VEC and give up. This part of the compiler is not very familiar to me. By give up, you mean returning 0, or would something like below be appropriate ? In any case, I'll prepare a properly formed submission. Thanks for your help, Kind Regards, Olivier *** unroll.c 2001/11/27 22:09:09 1.149 --- unroll.c 2001/11/29 09:32:44 *************** loop_iterations (loop) *** 3529,3534 **** --- 3529,3536 ---- do { if (GET_CODE (temp) == JUMP_INSN + /* Avoid analyzing jumps not related to the loop. */ + && JUMP_LABEL (temp) != 0 /* Previous unrolling may have generated new insns not covered by the uid_luid array. */ && INSN_UID (JUMP_LABEL (temp)) < max_uid_for_loop