From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C80E33858D20; Wed, 9 Aug 2023 13:14:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C80E33858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691586867; bh=pZ8ynXR5jWbZcPOzQPMnDa7dpU2+En+evDVYQroQGqI=; h=From:To:Subject:Date:From; b=AeeJ1t8MtIIbpyJJY7F62C0+xrPATHCbDN0UH7pWGBtLK2zlyQkl2RCIzqVUHUm9Z exgJp9xzTLkmmrQB9dTg94Ayr5Ah87wW/5thApht09hyKzGM5Rdcaue0V6nejU+GEM W9TTGLlluqLR+j0yQRi9SHv2OcZGQy/CVyLUcmxc= From: "john_platts at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110960] New: TestSatWidenMulPairwiseAdd in the Google Highway Test suite fails when compiled with GCC 12 or later with the -mcpu=power9 option Date: Wed, 09 Aug 2023 13:14:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: john_platts at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110960 Bug ID: 110960 Summary: TestSatWidenMulPairwiseAdd in the Google Highway Test suite fails when compiled with GCC 12 or later with the -mcpu=3Dpower9 option Product: gcc Version: 12.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: john_platts at hotmail dot com Target Milestone: --- Here are the steps to reproduce the problem: 1. Clone the Google Highway git repository from https://github.com/google/highway.git. 2. Create a build directory called hwy_ppc9_gcc12_build in the highway directory. 3. In the hwy_ppc9_gcc12_build directory, execute the following command: CC=3Dpowerpc64le-linux-gnu-gcc-12 CXX=3Dpowerpc64le-linux-g++-12 cmake .. -DCMAKE_C_COMPILER_TARGET=3D"powerpc64le-linux-gnu" -DCMAKE_CXX_COMPILER_TARGET=3D"powerpc64le-linux-gnu" -DCMAKE_C_FLAGS=3D'-mcpu=3Dpower9' -DCMAKE_CXX_FLAGS=3D'-mcpu=3Dpower9 -DHWY_DISABLED_TARGETS=3D6918232715082858496 -DHWY_BROKEN_TARGETS=3D0' -DHWY_ENABLE_CONTRIB=3DOFF 4. After the cmake command is executed, execute the "make mul_test" command= in the hwy_ppc9_gcc12_build directory. 5. Execute the ./tests/mul_test program in the hwy_ppc9_gcc12_build directo= ry. Here is the expected output of the mul_test program: [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] Running 9 tests from 1 test suite. [----------] Global test environment set-up. [----------] 9 tests from HwyMulTestGroup/HwyMulTest [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMul/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMul/PPC9 (21 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulHigh/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulHigh/PPC9 (2 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulFixedPoint15/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulFixedPoint15/PPC9 (45 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulEven/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulEven/PPC9 (3 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulAdd/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulAdd/PPC9 (22 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllWidenMulPairwiseAdd/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllWidenMulPairwiseAdd/PPC9 (3 = ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllSatWidenMulPairwiseAdd/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllSatWidenMulPairwiseAdd/PPC9 = (5 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllReorderWidenMulAccumulate/PP= C9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllReorderWidenMulAccumulate/PP= C9 (5 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllRearrangeToOddPlusEven/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllRearrangeToOddPlusEven/PPC9 = (0 ms) [----------] 9 tests from HwyMulTestGroup/HwyMulTest (112 ms total) [----------] Global test environment tear-down [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] 9 tests from 1 test suite ran. (117 ms tot= al) [ PASSED ] 9 tests. Here is the actual output of the mul_test program when compiled with GCC 12= and the -mcpu=3Dpower9 options: [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D] Running 9 tests from 1 test suite. [----------] Global test environment set-up. [----------] 9 tests from HwyMulTestGroup/HwyMulTest [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMul/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMul/PPC9 (11 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulHigh/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulHigh/PPC9 (3 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulFixedPoint15/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulFixedPoint15/PPC9 (46 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulEven/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulEven/PPC9 (1 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllMulAdd/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllMulAdd/PPC9 (15 ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllWidenMulPairwiseAdd/PPC9 [ OK ] HwyMulTestGroup/HwyMulTest.TestAllWidenMulPairwiseAdd/PPC9 (4 = ms) [ RUN ] HwyMulTestGroup/HwyMulTest.TestAllSatWidenMulPairwiseAdd/PPC9 i16x8 expect [0+ ->]: 0xEB00,0xEA00,0xE900,0xE800,0xE700,0xE600,0xE500, i16x8 actual [0+ ->]: 0x8000,0x8000,0x8000,0x8000,0x8000,0x8000,0x8000, Abort at /home/some_user/hwy_ppc9_build_080923/highway/hwy/tests/mul_test.cc:585: PP= C9, i16x8 lane 0 mismatch: expected '0xEB00', got '0x8000'. Aborted (core dumped) The TestAllSatWidenMulPairwiseAdd test failure does not occur when hwy/tests/mul_test.cc is compiled with GCC 11 or Clang 16 with the "-mcpu=3Dpower9 -DHWY_DISABLED_TARGETS=3D6918232715082858496 -DHWY_BROKEN_TARGETS=3D0" options. I have written some test programs to try to reproduce the problem (one test program that only uses the Altivec intrinsics and another test program that uses the Google Highway library), and I was not encountering the same failu= res with those test programs. Attached is another test program to try to reproduce the problem, and the attached test program runs successfully when compiled with GCC 12 with the -mcpu=3Dpower9 option.=