[Bug 1449116] Re: [Ubuntu 15.10] gcc 4.9: Improve vector performance by removing unnecessary swap operations

Logan Rosen loganrosen at gmail.com
Sat May 23 01:23:08 UTC 2015


** Package changed: ubuntu => gcc-4.9 (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.9 in Ubuntu.
https://bugs.launchpad.net/bugs/1449116

Title:
  [Ubuntu 15.10] gcc 4.9: Improve vector performance by removing
  unnecessary swap operations

Status in gcc-4.9 package in Ubuntu:
  New

Bug description:
  For vector memory operations, GCC generates less efficient code for
  little endian POWER than for big endian POWER.  This is because the
  VSX vector loads and stores (lxvd2x, stxvd2x, lxvw4x, stxvw4x) assume
  a vector register element ordering where the lowest-numbered element
  resides in the most significant portion of the register.  That is,
  they operate according to a big-endian element ordering no matter what
  endian mode the machine is running in.  To generate correct code
  regardless of this, GCC will generate a lxvd2x/xxswapd pair of
  instructions for each load, and an xxswapd/stxvd2x pair of
  instructions for each store.  The extra xxswapd instructions force the
  vector elements into the proper lanes, but at a cost in performance.

  In August 2014, I added a pass to GCC that removes the extra swap
  operations when they are not necessary for correctness.  This greatly
  improves vector performance for ppc64el.  This optimization can be
  done for computations where all of the vector operations are "lane-
  insenstive"; that is, they don't care which lanes the computations are
  performed in, so long as values are stored back to memory in the
  correct order.

  To take advantage of this improved performance, I've backported the
  swap optimization pass to GCC 4.9 in revision r221691.  I would like
  to request that this patch be applied to the next service pack for
  each Ubuntu release that uses GCC 4.9.  (I believe this includes 14.10
  and 15.04.)  I realize it is too late to get this into the 15.04 base
  release.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.9/+bug/1449116/+subscriptions



More information about the foundations-bugs mailing list