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/51581] New: Integer division by constant is not vectorized


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.


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