public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110960] New: TestSatWidenMulPairwiseAdd in the Google Highway Test suite fails when compiled with GCC 12 or later with the -mcpu=power9 option
@ 2023-08-09 13:14 john_platts at hotmail dot com
  2023-08-09 13:16 ` [Bug target/110960] " john_platts at hotmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: john_platts at hotmail dot com @ 2023-08-09 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110960
           Summary: TestSatWidenMulPairwiseAdd in the Google Highway Test
                    suite fails when compiled with GCC 12 or later with
                    the -mcpu=power9 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=powerpc64le-linux-gnu-gcc-12 CXX=powerpc64le-linux-g++-12 cmake ..
-DCMAKE_C_COMPILER_TARGET="powerpc64le-linux-gnu"
-DCMAKE_CXX_COMPILER_TARGET="powerpc64le-linux-gnu"
-DCMAKE_C_FLAGS='-mcpu=power9' -DCMAKE_CXX_FLAGS='-mcpu=power9
-DHWY_DISABLED_TARGETS=6918232715082858496 -DHWY_BROKEN_TARGETS=0'
-DHWY_ENABLE_CONTRIB=OFF
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 directory.

Here is the expected output of the mul_test program:
[==========] 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/PPC9
[       OK ] HwyMulTestGroup/HwyMulTest.TestAllReorderWidenMulAccumulate/PPC9
(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
[==========] 9 tests from 1 test suite ran. (117 ms total)
[  PASSED  ] 9 tests.

Here is the actual output of the mul_test program when compiled with GCC 12 and
the -mcpu=power9 options:
[==========] 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: PPC9,
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=power9 -DHWY_DISABLED_TARGETS=6918232715082858496
-DHWY_BROKEN_TARGETS=0" 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 failures
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=power9 option.

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

end of thread, other threads:[~2024-03-29 18:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 13:14 [Bug target/110960] New: TestSatWidenMulPairwiseAdd in the Google Highway Test suite fails when compiled with GCC 12 or later with the -mcpu=power9 option john_platts at hotmail dot com
2023-08-09 13:16 ` [Bug target/110960] " john_platts at hotmail dot com
2023-08-09 13:19 ` [Bug target/110960] TestSatWidenMulPairwiseAdd in the Google Highway test " john_platts at hotmail dot com
2023-08-09 13:22 ` john_platts at hotmail dot com
2023-08-09 16:10 ` john_platts at hotmail dot com
2023-08-09 16:11 ` john_platts at hotmail dot com
2023-08-10 13:50 ` john_platts at hotmail dot com
2023-09-08  9:19 ` malat at debian dot org
2023-09-08 15:58 ` pinskia at gcc dot gnu.org
2023-09-09 17:47 ` john_platts at hotmail dot com
2023-09-09 17:59 ` john_platts at hotmail dot com
2023-09-09 20:05 ` john_platts at hotmail dot com
2024-03-29 18:11 ` meissner 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).