This is the mail archive of the gcc-patches@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]

[PATCH] Fix PR 43544 to fix TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION interface


I was looking at the rs6000_builtin_vectorized_function and noticed that it
takes an integer that gives the builtin function index.  Unfortunately on the
powerpc and cell architectures, the builtin function id overlaps with the
system builtins, and you need to look at the builtin class before using the
builtin index.

This can be fixed in two ways, vectorizable_function in tree-vect-stmts.c can
add a check for DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL or the two
ports that use the hook (i386, rs6000) can be modified to take a tree instead
of the integer.  I tend to think the later is preferable, because it would
allow a MD scalar builtin to be vectorized.

This patch fixes the problem the second way.  I have built bootstrapped i386
and rs6000 compilers.  To test the case if the hook isn't provided, I
temporarily deleted the hook in the rs6000 and built it, without getting
errors.

I tend to think it should be fixed in 4.5, but I am certainly willing to hold
off on it until 4.6.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com

Attachment: bug-43544.patch01
Description: Text document


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