This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: making the new if-converter not mangle IR that is already vectorizer-friendly
- From: Abe <abe_skolnik at yahoo dot com>
- To: Alan Lawrence <alan dot lawrence at arm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Sebastian Pop <sebpop at gmail dot com>
- Date: Thu, 23 Jul 2015 15:24:31 -0500
- Subject: Re: making the new if-converter not mangle IR that is already vectorizer-friendly
- Authentication-results: sourceware.org; auth=none
- References: <55946699 dot 4070803 at yahoo dot com> <559504BE dot 40207 at arm dot com> <5595AB07 dot 7040404 at yahoo dot com> <559657CA dot 4080706 at arm dot com> <559C3CAF dot 9040308 at yahoo dot com> <559CF42B dot 4010308 at arm dot com> <559D5489 dot 1040808 at yahoo dot com> <55AD2DD8 dot 9070000 at arm dot com> <55AD4DF4 dot 5060108 at yahoo dot com> <55AE1CCE dot 8020405 at arm dot com>
[Abe wrote:]
Ideally, I/we fix the above problem -- and the rest of the regressions in the new if converter --
[Alan wrote:]
OK, what are these regressions?
Each of these files` test cases currently fails to be autovectorized:
gcc/testsuite/gcc.dg/vect/pr61194.c
gcc/testsuite/gcc.dg/vect/vect-mask-load-1.c
gcc/testsuite/gcc.dg/vect/vect-mask-loadstore-1.c
gcc/testsuite/gcc.target/i386/avx2-gather-6.c
gcc/testsuite/gcc.target/i386/avx2-vect-aggressive-1.c
gcc/testsuite/gcc.target/i386/avx2-vect-aggressive.c
[Alan wrote:]
Well, any array access could introduce an extra fault (unless it's dominated by another equivalent (read/write) access)...?
I respectfully disagree. Given code such as this:
for (unsigned short index = 1; index < 9; ++index)
array[index] = index;
... and assuming that "array" is an _array_ variable, i.e. it is _not_ a [re-assignable] pointer, it should be
clear IMO to all human readers that this code will not segfault, and if any compiler cannot also correctly arrive
at the conclusion "this array access is always good", then that compiler needs to get better at analysis IMO.
AFAIK, value range propagation [in the above example, for "index"] has been in GCC for many years...
http://www.airs.com/dnovillo/Papers/gcc2005.pdf
https://gcc.gnu.org/ml/gcc-patches/2000-07/msg00968.html
http://gcc.1065356.n5.nabble.com/Value-range-propagation-pass-in-4-0-1-RC1-or-not-td660293.html
[and I`m sure there are many more]
Regards,
Abe