public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110118] New: Miss CSE optimization for vptest after r14-1466-g3635e8c67e13e3da7e1e23a617dd9952218e93e0
@ 2023-06-05  1:55 crazylht at gmail dot com
  2023-06-05  1:58 ` [Bug target/110118] " crazylht at gmail dot com
  2023-06-22  6:44 ` cvs-commit at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: crazylht at gmail dot com @ 2023-06-05  1:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110118
           Summary: Miss CSE optimization for vptest after
                    r14-1466-g3635e8c67e13e3da7e1e23a617dd9952218e93e0
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---

#include <immintrin.h>

int do_stuff(__m256i Y0, __m256i Y1, __m128i X2) {
  __m256i And01 = _mm256_and_si256(Y0, Y1);
  int TestResult = _mm256_testc_si256(And01, And01);
  int t1 = _mm256_testz_si256(And01, And01);
  return TestResult + t1;
}


GCC 12.2 generates

do_stuff:
        vpand   %ymm1, %ymm0, %ymm0
        xorl    %eax, %eax
        vptest  %ymm0, %ymm0
        sete    %al
        adcl    $0, %eax
        ret

GCC trunk generates

do_stuff:
        vpand   %ymm1, %ymm0, %ymm0
        xorl    %eax, %eax
        vptest  %ymm0, %ymm0
        setc    %al
        xorl    %edx, %edx
        vptest  %ymm0, %ymm0
        sete    %dl
        addl    %edx, %eax
        ret

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

end of thread, other threads:[~2023-06-22  6:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05  1:55 [Bug target/110118] New: Miss CSE optimization for vptest after r14-1466-g3635e8c67e13e3da7e1e23a617dd9952218e93e0 crazylht at gmail dot com
2023-06-05  1:58 ` [Bug target/110118] " crazylht at gmail dot com
2023-06-22  6:44 ` cvs-commit 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).