public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/51581] New: Integer division by constant is not vectorized
@ 2011-12-16 16:25 jakub at gcc dot gnu.org
  2011-12-16 16:31 ` [Bug tree-optimization/51581] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-16 16:25 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-06-28 17:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-16 16:25 [Bug tree-optimization/51581] New: Integer division by constant is not vectorized jakub at gcc dot gnu.org
2011-12-16 16:31 ` [Bug tree-optimization/51581] " jakub at gcc dot gnu.org
2011-12-19  9:35 ` rguenth at gcc dot gnu.org
2012-06-13 19:22 ` jakub at gcc dot gnu.org
2012-06-14 13:32 ` jakub at gcc dot gnu.org
2012-06-15 11:08 ` jakub at gcc dot gnu.org
2012-06-15 11:09 ` jakub at gcc dot gnu.org
2012-06-28 17:54 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).