After https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00743.html I see this test fail on arm targets. Changing the scan-tree-dump-times to scan for only one occurrence makes the test pass
I will have a look.
Hmm, with a cross to arm-none-eabi and -O2 -ftree-vectorize I see grep 'vect_recog_over_widening_pattern: detected' t.c.146t.vect t.c:14:3: note: vect_recog_over_widening_pattern: detected: _130 = (signed short) patt_131; t.c:14:3: note: vect_recog_over_widening_pattern: detected: patt_128 = _129 << 3; t.c:14:3: note: vect_recog_over_widening_pattern: detected: _126 = (signed short) patt_127; t.c:14:3: note: vect_recog_over_widening_pattern: detected: patt_124 = _125 << 3; any other configury / option besides that required? Yes, 4 is also not 2, the other two are from t.c:14:3: note: ***** Re-trying analysis with vector size 8 and it doesn't vectorize at all because it doesnt' support unaligned loads. Please provide more information to reproduce with a cross or attach the vectorizer dump.
Created attachment 37387 [details] Vectorizer dump Hi Richard, Here is a dump from a failing testcase. This was from a toolchain configured as --target=arm-eabi built using today's FSF mainline sources. Cheers Nick
For some reason you get widening shifts recognized while I get them not supported by the HW (with the cross at -O2 -ftree-vectorize). -mfpu=neon doesn't help. I still can't reproduce your dump file with /space/rguenther/src/svn/trunk3/configure --target=arm-none-eabi gcc> /cc1 -quiet t.c -O2 -ftree-vectorize -fdump-tree-vect-details -fno-vect-cost-model -fno-common -mfpu=neon -march=armv7-a please advise further. Also you might want to try if guarding the check with { target ! vect_widen_shift } and adding a variant for vect_widen_shift to scan for 1 occurence fixes the testcase. That would make sense to me.
(In reply to Richard Biener from comment #4) > For some reason you get widening shifts recognized while I get them not > supported by the HW (with the cross at -O2 -ftree-vectorize). -mfpu=neon > doesn't help. > > I still can't reproduce your dump file with > > /space/rguenther/src/svn/trunk3/configure --target=arm-none-eabi > gcc> /cc1 -quiet t.c -O2 -ftree-vectorize -fdump-tree-vect-details > -fno-vect-cost-model -fno-common -mfpu=neon -march=armv7-a > Can you try adding -mfloat-abi=hard to the command line?
On Tue, 19 Jan 2016, ktkachov at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66877 > > --- Comment #5 from ktkachov at gcc dot gnu.org --- > (In reply to Richard Biener from comment #4) > > For some reason you get widening shifts recognized while I get them not > > supported by the HW (with the cross at -O2 -ftree-vectorize). -mfpu=neon > > doesn't help. > > > > I still can't reproduce your dump file with > > > > /space/rguenther/src/svn/trunk3/configure --target=arm-none-eabi > > gcc> /cc1 -quiet t.c -O2 -ftree-vectorize -fdump-tree-vect-details > > -fno-vect-cost-model -fno-common -mfpu=neon -march=armv7-a > > > > Can you try adding -mfloat-abi=hard to the command line? Thanks, that way it works. Just figured I can't test if the suggested testsuite addition works though.
I can test on ARM ;), so taken - https://gcc.gnu.org/ml/gcc-patches/2016-01/msg01727.html.
Fix committed r232720.