[Bug tree-optimization/44976] New: short variables do not get vectorized

2010-07-17 Thread roy dot 1rosen at gmail dot com
short variables do not get vectorized the same as unsigned short variables


-- 
   Summary: short variables do not get vectorized
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roy dot 1rosen at gmail dot com
 GCC build triplet: elf
  GCC host triplet: linux
GCC target triplet: ia64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44976



[Bug tree-optimization/44976] short variables do not get vectorized

2010-07-17 Thread roy dot 1rosen at gmail dot com


--- Comment #1 from roy dot 1rosen at gmail dot com  2010-07-18 05:22 
---
Created an attachment (id=21240)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21240action=view)
preprocessed file

For the following code, if ts is short it does not get vectorized.
If ts is unsigned short it does.

#define ts short
ts xx(ts* __restrict__ a)
{
ts i;
ts sum = 0;
for (i = 0; i  16; i++)
sum += a[i];
return sum;
}

{lnxb2} /home/swproj/sw/users/eyalhar/ia64-46/gcc/  ./xgcc -v -save-temps  -O3
./a.c -ftree-vectorizer-verbose=2
Using built-in specs.
COLLECT_GCC=./xgcc
Target: ia64-elf-linux
Configured with: ../gcc-4.6-20100710/configure --target=ia64-elf-linux
--enable-languages=c
Thread model: posix
gcc version 4.6.0 20100710 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-ftree-vectorizer-verbose=2'
 cc1 -E -quiet -v -iprefix ./../lib/gcc/ia64-elf-linux/4.6.0/ ./a.c
-ftree-vectorizer-verbose=2 -O3 -fpch-preprocess -o a.i
ignoring nonexistent directory ./../lib/gcc/ia64-elf-linux/4.6.0/include
ignoring nonexistent directory
./../lib/gcc/ia64-elf-linux/4.6.0/include-fixed
ignoring nonexistent directory
./../lib/gcc/ia64-elf-linux/4.6.0/../../../../ia64-elf-linux/sys-include
ignoring nonexistent directory
./../lib/gcc/ia64-elf-linux/4.6.0/../../../../ia64-elf-linux/include
ignoring nonexistent directory
./../lib/gcc/../../lib/gcc/ia64-elf-linux/4.6.0/include
ignoring nonexistent directory
./../lib/gcc/../../lib/gcc/ia64-elf-linux/4.6.0/include-fixed
ignoring nonexistent directory
./../lib/gcc/../../lib/gcc/ia64-elf-linux/4.6.0/../../../../ia64-elf-linux/sys-include
ignoring nonexistent directory
./../lib/gcc/../../lib/gcc/ia64-elf-linux/4.6.0/../../../../ia64-elf-linux/include
#include ... search starts here:
#include ... search starts here:
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-ftree-vectorizer-verbose=2'
 cc1 -fpreprocessed a.i -quiet -dumpbase a.c -auxbase a -O3 -version
-ftree-vectorizer-verbose=2 -o a.s
GNU C (GCC) version 4.6.0 20100710 (experimental) (ia64-elf-linux)
compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-44), GMP
version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20100710 (experimental) (ia64-elf-linux)
compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-44), GMP
version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 151e5af8467c30bb3072214d4253f912

./a.c:79: note: not vectorized: unsupported use in stmt.
./a.c:75: note: vectorized 0 loops in function.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-ftree-vectorizer-verbose=2'
 as -x -o a.o a.s
as: unrecognized option `-x'


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44976



[Bug rtl-optimization/44479] false dependencies are computed after vectorization

2010-07-15 Thread roy dot 1rosen at gmail dot com


--- Comment #7 from roy dot 1rosen at gmail dot com  2010-07-15 06:52 
---
Looks good now.
Thanks for the fix.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44479



[Bug rtl-optimization/44479] false dependencies are computed after vectorization

2010-07-04 Thread roy dot 1rosen at gmail dot com


--- Comment #6 from roy dot 1rosen at gmail dot com  2010-07-04 19:32 
---
Subject: Re:  false dependencies are computed 
after vectorization

Unfortunatelly I am OOO until the end of next week.
I would check it as soon as I get back.

Thanks, Roy.

2010/7/4, rguenth at gcc dot gnu dot org gcc-bugzi...@gcc.gnu.org:


 --- Comment #5 from rguenth at gcc dot gnu dot org  2010-07-04 16:09 
 ---
 Can you re-check now?  I'm not good at reading scheduler dumps but at 
 expansion
 time it looks good to me even with IVOPTs turned on now.


 --


 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44479

 --- You are receiving this mail because: ---
 You are on the CC list for the bug, or are watching someone who is.
 You reported the bug, or are watching the reporter.



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44479



[Bug rtl-optimization/44479] New: false dependencies are computed after vectorization

2010-06-09 Thread roy dot 1rosen at gmail dot com
' '-fsched-verbose=10' '-fno-ivopts' '-fdump-rtl-all'
'-v' '-save-temps' '-mtune=i386' '-march=i386'
 as -V -Qy --32 -o a.o a.s
GNU assembler version 2.17.50.0.6-9.el5 (x86_64-redhat-linux) using BFD version
2.17.50.0.6-9.el5 20061020
COMPILER_PATH=
LIBRARY_PATH=
COLLECT_GCC_OPTIONS='-O3' '-fsched-verbose=10' '-fno-ivopts' '-fdump-rtl-all'
'-v' '-save-temps' '-mtune=i386' '-march=i386'
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 crt1.o crti.o crtbegin.o a.o
-lgcc -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o


-- 
   Summary: false dependencies are computed after vectorization
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roy dot 1rosen at gmail dot com
 GCC build triplet: elf
  GCC host triplet: linux
GCC target triplet: i386


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44479



[Bug rtl-optimization/44479] false dependencies are computed after vectorization

2010-06-09 Thread roy dot 1rosen at gmail dot com


--- Comment #1 from roy dot 1rosen at gmail dot com  2010-06-09 11:28 
---
Created an attachment (id=20876)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20876action=view)
preprocessed file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44479



[Bug tree-optimization/44403] New: vectorization does not maintain 'restrict' qualifier

2010-06-03 Thread roy dot 1rosen at gmail dot com
2.17.50.0.6-9.el5 20061020
COMPILER_PATH=
LIBRARY_PATH=
COLLECT_GCC_OPTIONS='-save-temps' '-v' '-O3' '-fno-ivopts' '-mtune=i386'
'-march=i386'
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 crt1.o crti.o crtbegin.o a.o
-lgcc -lgcc_eh -lc -lgcc -lgcc_eh crtend.o crtn.o
ld: crt1.o: No such file: No such file or directory


-- 
   Summary: vectorization does not maintain 'restrict' qualifier
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roy dot 1rosen at gmail dot com
 GCC build triplet: elf
  GCC host triplet: linux
GCC target triplet: i386


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44403



[Bug tree-optimization/44403] vectorization does not maintain 'restrict' qualifier

2010-06-03 Thread roy dot 1rosen at gmail dot com


--- Comment #1 from roy dot 1rosen at gmail dot com  2010-06-03 15:49 
---
Created an attachment (id=20818)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20818action=view)
preprocessed file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44403



[Bug target/44284] New: vectorization does not work for short variable

2010-05-26 Thread roy dot 1rosen at gmail dot com
Hi,

I have tried vectorization and encountered a problem which I can see
is common to some ports (I tried ia64 and bfin).

For this function:

#define ts unsigned short
void f(ts* __restrict__ a, ts* __restrict__ b, ts* __restrict__ x)
{
   int i;
   for (i=0;i1024;i++)
   x[i] = a[i] + b[i];
}

the loop is vectorized.
But if I define ts as follows: #define ts short
then the loop is not vectorized. The message I get is:

./a.c:21: note: no optab.
./a.c:21: note: not vectorized: relevant stmt not supported: D.1279_12
= (short unsigned int) D.1278_11;

I have tried to look a bit in the vectorizer code and it seems that
for this stmt I get to vectorizable_operation with code==NOP_EXPR
which is not handled.

Does anyone knows anything about this problem?

Thanks, Roy.

./xgcc -v -save-temps -O3 -S ./a.c -ftree-vectorizer-verbose=2
Using built-in specs.
Target: ia64-*-linux
Configured with: ../gcc-4.4.3/configure --target='ia64-*-linux'
--enable-languages=c : (reconfigured)
Thread model: posix
gcc version 4.4.3 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-S' '-ftree-vectorizer-verbose=2'
 cc1 -E -quiet -v -iprefix
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/ia64-*-linux/4.4.3/ ./a.c
-ftree-vectorizer-verbose=2 -O3 -fpch-preprocess -o a.i
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/ia64-*-linux/4.4.3/include
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/ia64-*-linux/4.4.3/include-fixed
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/ia64-*-linux/4.4.3/../../../../ia64-*-linux/sys-include
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/ia64-*-linux/4.4.3/../../../../ia64-*-linux/include
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/../../lib/gcc/ia64-*-linux/4.4.3/include
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/../../lib/gcc/ia64-*-linux/4.4.3/include-fixed
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/../../lib/gcc/ia64-*-linux/4.4.3/../../../../ia64-*-linux/sys-include
ignoring nonexistent directory
/home/swproj/sw/users/eyalhar/gcc-ia64/gcc/../lib/gcc/../../lib/gcc/ia64-*-linux/4.4.3/../../../../ia64-*-linux/include
#include ... search starts here:
#include ... search starts here:
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-S' '-ftree-vectorizer-verbose=2'
 cc1 -fpreprocessed a.i -quiet -dumpbase a.c -auxbase a -O3 -version
-ftree-vectorizer-verbose=2 -o a.s
GNU C (GCC) version 4.4.3 (ia64-*-linux)
compiled by GNU C version 4.1.2 20080704 (Red Hat 4.1.2-44), GMP
version 4.3.2, MPFR version 2.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: cc15465375f06438c45a5c1ccdf35a17

./a.c:21: note: not vectorized: relevant stmt not supported: D.1236_12 = (short
unsigned int) D.1235_11;

./a.c:18: note: vectorized 0 loops in function.
COMPILER_PATH=
LIBRARY_PATH=
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-O3' '-S' '-ftree-vectorizer-verbose=2'


-- 
   Summary: vectorization does not work for short variable
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: roy dot 1rosen at gmail dot com
 GCC build triplet: *
  GCC host triplet: linux
GCC target triplet: ia64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44284



[Bug target/44284] vectorization does not work for short variable

2010-05-26 Thread roy dot 1rosen at gmail dot com


--- Comment #1 from roy dot 1rosen at gmail dot com  2010-05-26 15:38 
---
Created an attachment (id=20752)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20752action=view)
preprocessed file


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44284