[Bug rtl-optimization/106705] constant prop is not undone for switches

2022-08-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106705 --- Comment #3 from Richard Biener --- So you expect us to somehow generate val2 = -len; switch (len) { case 7: do_sd(val, mem, val2++); case 6: do_sd(val, mem, val2++); ca

[Bug rtl-optimization/106705] constant prop is not undone for switches

2022-08-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106705 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement --- Comment #2 from Andrew

[Bug rtl-optimization/106705] constant prop is not undone for switches

2022-08-21 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106705 --- Comment #1 from Andrew Pinski --- Note the cost for constant loading usually is expensive which is why this case is usually ignored ... It is more costly on in-order chips though, especially RISCV where constant forming takes 3 instructions