This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/79365] New: tile*: incorrect result for expressions where result of a vector compare is used as a scalar
- From: "walt at tilera dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2017 19:32:33 +0000
- Subject: [Bug target/79365] New: tile*: incorrect result for expressions where result of a vector compare is used as a scalar
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79365
Bug ID: 79365
Summary: tile*: incorrect result for expressions where result
of a vector compare is used as a scalar
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: walt at tilera dot com
Target Milestone: ---
The following code is miscompiled by gcc:
unsigned long foo(unsigned long v, unsigned char byte) {
return __insn_v1cmpeq (v, byte) >> 1;
}
__insn_v1cmpeq is the intrinsic for byte-wise vector compare. This gets
compiled to:
movei r0, 0
jrp lr
The v1cmpeq has been incorrectly eliminated. This bug shows up in our
target-optimized strcmp routines in glibc.