This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51581] New: Integer division by constant is not vectorized
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 16 Dec 2011 16:22:21 +0000
- Subject: [Bug tree-optimization/51581] New: Integer division by constant is not vectorized
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51581
Bug #: 51581
Summary: Integer division by constant is not vectorized
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
CC: irar@gcc.gnu.org
(Now in 4.7 with the exception of division by power of 2 constant).
But as the following testcase shows, if target doesn't have a vector integer
division instruction, we could reuse expmed.c choose_multiplier and parts of
expand_divmod to pattern recognize it as multiplication by some constant and
some shifts. All we need is a vectorized highpart signed/unsigned
multiplication or widening multiplication for the vector mode in question
(e.g. on i?86/x86_64 we have a highpart signed/unsigned multiplication for
V*HImode vectors and widening multiplication (perhaps for AVX2 purposes we
could
come up with better optimized highpart V8SImode pattern) for V*SImode vectors.