On 04/15/2015 03:13 AM, Ramana Radhakrishnan wrote: > On Thu, Mar 5, 2015 at 1:34 PM, Xingxing Pan wrote: >> Hi, >> >> The expanding of widen-sum pattern always fails. The vectorizer expects the >> operands to have the same size, while the current implementation of >> widen-sum pattern dose not conform to this. >> >> This patch implements the widen-sum pattern with vpadal. Change the vaddw >> pattern to anonymous. Add widen-sum test cases for neon. >> > > Can you please respin addressing James and Kyrill's comments ? > > > Ramana > >> -- >> Regards, >> Xingxing Hi, Sorry for late response. The pattern is rewritten to utilize neon_vpadal's "0" constraints. Have run vect.exp and neon.exp in an armv7 board. vect.exp has two new XFAILs: XFAIL: gcc.dg/vect/slp-reduc-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 XFAIL: gcc.dg/vect/slp-reduc-3.c -flto -ffat-lto-objects scan-tree-dump-times vect "vectorizing stmts using SLP" 1 This is because widen-sum optimization precedes SLP. The xfail predicate vect_widen_sum_hi_to_si becomes true when widen-sum is enabled. neon.exp has four new XFAILs: XFAIL: gcc.target/arm/neon/vect-widen-sum-char2short-s-d.c scan-tree-dump-times vect "pattern recognized.*w\\+" 1 XFAIL: gcc.target/arm/neon/vect-widen-sum-char2short-s-d.c scan-rtl-dump-times expand "UNSPEC_VPADAL" 1 XFAIL: gcc.target/arm/neon/vect-widen-sum-char2short-s.c scan-tree-dump-times vect "pattern recognized.*w\\+" 1 XFAIL: gcc.target/arm/neon/vect-widen-sum-char2short-s.c scan-rtl-dump-times expand "UNSPEC_VPADAL" 1 If the widen-sum pattern is successfully expanded, "w+" and "UNSPEC_VPADAL" should appear in the dump file like other vect-widen-sum-*.c tests. But vect-widen-sum-char2short-s[-d].c is special because at tree level the signed operations will be converted into unsigned operations, which destroy the widen-sum pattern. That is due to the workaround of PR tree-optimization/25125. I just add xfail following gcc.dg/vect/vect-reduc-pattern-2c.c. -- Regards, Xingxing