This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79365] New: tile*: incorrect result for expressions where result of a vector compare is used as a scalar


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]