[Bug rtl-optimization/85551] No strength reduction of modulo and integer vision

2018-04-27 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85551 --- Comment #2 from Allan Jensen --- Hmm.. I appear to have made unsafe assumptions in the mod_opt cases. The first safe optimization version would then be: void mod_opt(int *a, int count, int stride, unsigned width) { int pos_opt = 0;

[Bug rtl-optimization/85551] No strength reduction of modulo and integer vision

2018-04-27 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85551 --- Comment #1 from Allan Jensen --- I also stumbled on this old motivating article when I tried googling the concept: http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TM-600.pdf