I tracked this down. It was related to the FSF bug 47755.
Basically the compiler knows that the keyfield structure is aligned to
128 bits, so that it optimizes two adjacent 64-bit integers into a
vector. Unfortunately if both fields are initialized as constants, the
compiler thinks the constant is easy and generates code to load up the
constant without using memory. Unfortunately, the code generated is
incorrect.
A simple way to show the problem is with the code fragment:
void foo(vector long long *a) { *a = (vector long long) { -1, 0 }; }
It generates a vsplitw instruction that loads up all 0's into the vector
register.
I have a preliminary patch that fixes this, but I may update the patch
to make it more general.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/727261
Title:
[ppc64] coreutils misc/sort test fails at -O3
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs