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, i386]: Vectorize round insn


Hello!

Attached patch enables vectorization of round function using sse4.1
round insn. AZ stands for "Away from Zero".

2011-08-26  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sse.md (round<mode>2): New expander.
	* config/i386/i386.c (enum ix86_builtins): Add
	IX86_BUILTIN_ROUND{PS,PD}_AZ{,256}.
	(struct builtin_description): Add __builtin_ia32_round{ps,pd}_az{,256}
	descriptions.
	(ix86_builtin_vectorized_function): Handle BUILT_IN_ROUND{,F} builtins.

testsuite/ChangeLog:

2011-08-26  Uros Bizjak  <ubizjak@gmail.com>

	* gcc.target/i386/sse_4_1-round-vec.c: New test.
	* gcc.target/i386/sse_4_1-roundf-vec.c: New test.
	* gcc.target/i386/avx-round-vec.c: New test.
	* gcc.target/i386/avx-roundf-vec.c: New test.

Bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32},
committed to mainline.

Uros.

Attachment: p.diff.txt
Description: Text document


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