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.