[Bug 1856682] Re: GCC Miscompilation in vectorized code
Bug Watch Updater
1856682 at bugs.launchpad.net
Wed Jan 29 22:57:39 UTC 2020
Launchpad has imported 4 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92950.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2019-12-16T07:51:59+00:00 Krebbel wrote:
The following testcase abort when being compiled with -O3 -march=z13 on
IBM Z:
struct a {
int b;
char c;
};
struct a d = {1, 16};
struct a *e = &d;
int f = 0;
int main() {
struct a g = {0, 0 };
f = 0;
for (; f <= 1; f++) {
g = d;
*e = g;
}
if (d.c != 16)
__builtin_abort();
}
The movv1qi pattern emits halfword load instructions instead of
character loads.
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1856682/comments/0
------------------------------------------------------------------------
On 2019-12-16T08:04:00+00:00 Krebbel wrote:
Author: krebbel
Date: Mon Dec 16 08:03:28 2019
New Revision: 279410
URL: https://gcc.gnu.org/viewcvs?rev=279410&root=gcc&view=rev
Log:
Fix PR92950: Wrong code emitted for movv1qi
The backend emits 16 bit memory loads for single element character
vector. As a result the character will not be right justified in the
GPR.
gcc/ChangeLog:
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
and lhrl with llc.
gcc/testsuite/ChangeLog:
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* gcc.target/s390/vector/pr92950.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/s390/vector/pr92950.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/s390/vector.md
trunk/gcc/testsuite/ChangeLog
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1856682/comments/1
------------------------------------------------------------------------
On 2019-12-17T08:38:02+00:00 Krebbel wrote:
Author: krebbel
Date: Tue Dec 17 08:37:26 2019
New Revision: 279453
URL: https://gcc.gnu.org/viewcvs?rev=279453&root=gcc&view=rev
Log:
Fix PR92950: Wrong code emitted for movv1qi
The backend emits 16 bit memory loads for single element character
vector. As a result the character will not be right justified in the
GPR.
gcc/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel at linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
and lhrl with llc.
gcc/testsuite/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel at linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* gcc.target/s390/vector/pr92950.c: New test.
Added:
branches/gcc-9-branch/gcc/testsuite/gcc.target/s390/vector/pr92950.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/config/s390/vector.md
branches/gcc-9-branch/gcc/testsuite/ChangeLog
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1856682/comments/2
------------------------------------------------------------------------
On 2019-12-17T08:42:26+00:00 Krebbel wrote:
Author: krebbel
Date: Tue Dec 17 08:41:54 2019
New Revision: 279454
URL: https://gcc.gnu.org/viewcvs?rev=279454&root=gcc&view=rev
Log:
Fix PR92950: Wrong code emitted for movv1qi
The backend emits 16 bit memory loads for single element character
vector. As a result the character will not be right justified in the
GPR.
gcc/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel at linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* config/s390/vector.md ("mov<mode>" for V_8): Replace lh, lhy,
and lhrl with llc.
gcc/testsuite/ChangeLog:
2019-12-17 Andreas Krebbel <krebbel at linux.ibm.com>
Backport from mainline
2019-12-16 Andreas Krebbel <krebbel at linux.ibm.com>
PR target/92950
* gcc.target/s390/vector/pr92950.c: New test.
Added:
branches/gcc-8-branch/gcc/testsuite/gcc.target/s390/vector/pr92950.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/config/s390/vector.md
branches/gcc-8-branch/gcc/testsuite/ChangeLog
Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1856682/comments/3
** Changed in: gcc
Status: Unknown => New
** Changed in: gcc
Importance: Unknown => High
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-8 in Ubuntu.
https://bugs.launchpad.net/bugs/1856682
Title:
GCC Miscompilation in vectorized code
Status in gcc:
New
Status in Ubuntu on IBM z Systems:
Triaged
Status in gcc-5 package in Ubuntu:
Invalid
Status in gcc-6 package in Ubuntu:
Invalid
Status in gcc-7 package in Ubuntu:
New
Status in gcc-8 package in Ubuntu:
New
Status in gcc-9 package in Ubuntu:
Fix Released
Status in gcc-5 source package in Xenial:
New
Status in gcc-6 source package in Xenial:
Invalid
Status in gcc-7 source package in Xenial:
Invalid
Status in gcc-8 source package in Xenial:
Invalid
Status in gcc-9 source package in Xenial:
Invalid
Status in gcc-5 source package in Bionic:
New
Status in gcc-6 source package in Bionic:
New
Status in gcc-7 source package in Bionic:
New
Status in gcc-8 source package in Bionic:
New
Status in gcc-9 source package in Bionic:
Invalid
Status in gcc-5 source package in Disco:
Invalid
Status in gcc-6 source package in Disco:
New
Status in gcc-7 source package in Disco:
New
Status in gcc-8 source package in Disco:
New
Status in gcc-9 source package in Disco:
New
Status in gcc-5 source package in Eoan:
Invalid
Status in gcc-6 source package in Eoan:
Invalid
Status in gcc-7 source package in Eoan:
New
Status in gcc-8 source package in Eoan:
New
Status in gcc-9 source package in Eoan:
New
Status in gcc-5 source package in Focal:
Invalid
Status in gcc-6 source package in Focal:
Invalid
Status in gcc-7 source package in Focal:
New
Status in gcc-8 source package in Focal:
New
Status in gcc-9 source package in Focal:
Fix Released
Bug description:
Miscompilation in autovectorized code.
---Steps to Reproduce---
See GCC BZ: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92950
The following testcase abort when being compiled with -O3 -march=z13
on IBM Z:
struct a {
int b;
char c;
};
struct a d = {1, 16};
struct a *e = &d;
int f = 0;
int main() {
struct a g = {0, 0 };
f = 0;
for (; f <= 1; f++) {
g = d;
*e = g;
}
if (d.c != 16)
__builtin_abort();
}
The movv1qi pattern emits halfword load instructions instead of character
loads.
All GCC versions since GCC 5 are affected.
Patches for GCC 8, 9, and 10 have been committed to the gcc.gnu.org branches.
Userspace tool common name: gcc
The userspace tool has the following bit modes: 64
Userspace rpm: various Ubuntu gcc packages
Package need to updated within LP
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1856682/+subscriptions
More information about the foundations-bugs
mailing list