public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110438] New: generating all-ones zmm needs dep-breaking pxor before ternlog
@ 2023-06-27 17:54 amonakov at gcc dot gnu.org
  2023-06-27 17:59 ` [Bug target/110438] " amonakov at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2023-06-27 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110438
           Summary: generating all-ones zmm needs dep-breaking pxor before
                    ternlog
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amonakov at gcc dot gnu.org
  Target Milestone: ---
            Target: x86_64-*-*

VPTERNLOG is never a dependency-breaking instruction on existing x86
implementations, so generating a vector of all-ones via bare ternlog can stall
waiting on destination register. GCC should emit a dependency-breaking PXOR,
otherwise it will be a false-dependency-on-popcnt-lzcnt debacle all over again.

#include <immintrin.h>

__m512i g(void)
{
    return (__m512i){ 0 } - 1;
}

g:
        # waits until previous computation
        # of zmm0 has completed
        vpternlogd      zmm0, zmm0, zmm0, 0xFF
        ret

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

end of thread, other threads:[~2023-11-30 10:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 17:54 [Bug target/110438] New: generating all-ones zmm needs dep-breaking pxor before ternlog amonakov at gcc dot gnu.org
2023-06-27 17:59 ` [Bug target/110438] " amonakov at gcc dot gnu.org
2023-06-28  0:35 ` crazylht at gmail dot com
2023-07-04 19:54 ` amonakov at gcc dot gnu.org
2023-07-12  7:51 ` cvs-commit at gcc dot gnu.org
2023-07-12  7:52 ` crazylht at gmail dot com
2023-07-18  3:33 ` cvs-commit at gcc dot gnu.org
2023-11-30 10:55 ` liuhongt 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).