public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95070] New: vec_cntlz_lsbb implementation uses BE semantics on LE
@ 2020-05-11 22:13 pc at us dot ibm.com
  2020-05-15 10:50 ` [Bug target/95070] " segher at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: pc at us dot ibm.com @ 2020-05-11 22:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95070

            Bug ID: 95070
           Summary: vec_cntlz_lsbb implementation uses BE semantics on LE
           Product: gcc
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pc at us dot ibm.com
  Target Milestone: ---

Created attachment 48512
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48512&action=edit
test case

This:
--
        vector unsigned char a = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
        int r = vec_cntlz_lsbb (a);
--
returns 14 on LE and 0 on BE. It should return 0 on both.

vec_cntlz_lsbb counts bytes with least significant bits of 0 *starting from the
lowest element number*.  In the above code, a[0] == 0xFF, so the count should
find 0 bytes.

The same issue occurs with vec_cnttz_lsbb (which should find 14 bytes in the
above example on both LE and BE, but finds 0 and 14, respectively).

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug target/95070] vec_cntlz_lsbb implementation uses BE semantics on LE
  2020-05-11 22:13 [Bug target/95070] New: vec_cntlz_lsbb implementation uses BE semantics on LE pc at us dot ibm.com
@ 2020-05-15 10:50 ` segher at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: segher at gcc dot gnu.org @ 2020-05-15 10:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95070

Segher Boessenkool <segher at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Closing as dup.

*** This bug has been marked as a duplicate of bug 95082 ***

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-15 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 22:13 [Bug target/95070] New: vec_cntlz_lsbb implementation uses BE semantics on LE pc at us dot ibm.com
2020-05-15 10:50 ` [Bug target/95070] " segher at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).