[Ubuntu 14.04] gcc 4.8: Improve vector performance by removing unnecessary swap optimizations

Bug #1449117 reported by bugproxy
This bug report is a duplicate of:  Bug #1311866: update binutils and GCC for trusty. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-4.8 (Ubuntu)
New
Undecided
Unassigned

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.8 in revision r221713. I would like to see this included in the next service release of 14.04 LTS. I believe this is the only Ubuntu release using GCC 4.8. A separate feature request has been opened for GCC 4.9.

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-123278 severity-medium targetmilestone-inin140402
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1449117/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
bugproxy (bugproxy)
tags: added: targetmilestone-inin14043
removed: targetmilestone-inin140402
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2015-05-11 03:02 EDT-------
<Note by Application Cdeadmin (<email address hidden>), 2015-05-10 22:00:05>

Logan Rosen (logan)
affects: ubuntu → gcc-4.8 (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

It appears that this bug is addressed by the SRU of gcc-4.8 4.8.4-2ubuntu1~14.04, currently in trusty-proposed awaiting completion of verification, which updates to revision 222448 on the gcc-4.8 branch. Marking this bug as a duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.