This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- 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=21240&action=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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]