https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83952

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
But at least we could perform strength reduction in IVOPTs, replacing

   for (i = 0; i < 100; i++) {
        val = 2 * i;
        a[i] = val;
    }

with

   for (i = 0, j = 0; i < 100; i++, j+=2) {
        val = j;
        a[i] = val;
    }

I guess we might even consider this but reject it based on costs.  Iff we
then could see that j is only used in a int to float conversion we might
evaluate precision/round-off issues and elide the IV to float ...

Reply via email to