Open V10lator opened 5 years ago
On that topic, I just found something curious with -O2 -ftree-vectorize
on rxvt-unicode 9.22. If I build it with -O3
, it's fine, with -O2
it's also fine, but if I build it with -O2 -ftree-vectorize
it segfaults while creating the window. Adding -ftree-loop-distribute-patterns
(which is normally enabled by -O3
) fixes it.
Not sure if it's a gcc bug, something misleading the compiler in rxvt, or something more specific to my setup. Haven't found anything else affected but it may possibly be unsafe on its own.
According to https://gcc.gnu.org/ml/gcc/2019-01/msg00019.html it might be a good idea to use "-O2 -ftree-vectorize" in case -O3 fails on modern CPUs. Only if -ftree-vectorize fails (which didn't happen for me while compiling ~600 packages) one should fallback to plain -O2.
With GCC 10 this might no longer be needed (if you look at the link you'll notice that GCC devs think about including -ftree-vectorize into -O2) but untill then I think it would be nice to have.