g:b29225597584b697762585e0b707b7cb4b427650 make -k check-gcc RUNTESTFLAGS="powerpc.exp=gcc.target/powerpc/vsx-builtin-10d.c" FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test # of expected passes 1 # of unexpected failures 1 This fails on power 9 BE (only) and fails for trunk as well as gcc 12 and 11. It works with gcc 10. It started with this commit in gcc 11. seurer@perfzep2:~/gcc/git/build/gcc-test$ gdb ./vsx-builtin-10d.exe (gdb) run Starting program: /home/seurer/gcc/git/build/gcc-test/vsx-builtin-10d.exe [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/powerpc64-linux-gnu/libthread_db.so.1". Program received signal SIGABRT, Aborted. __pthread_kill_implementation (threadid=<optimized out>, signo=<optimized out>, no_tid=<optimized out>) at pthread_kill.c:44 44 pthread_kill.c: No such file or directory. (gdb) where #0 __pthread_kill_implementation (threadid=<optimized out>, signo=<optimized out>, no_tid=<optimized out>) at pthread_kill.c:44 #1 0x00007ffff7c90cb4 in __GI_raise (sig=<optimized out>) at ../sysdeps/posix/raise.c:26 #2 0x00007ffff7c749ec in __GI_abort () at abort.c:79 #3 0x0000000010000670 in main (argc=<optimized out>, argv=<optimized out>) at /home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.target/powerpc/vsx-builtin-10d.c:124 sv = ci (sv, 5, CONST6); if (sv [5] != CONST6) abort (); // line 124 There are actually a bunch of similar failures FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test commit b29225597584b697762585e0b707b7cb4b427650 (HEAD) Author: Xionghu Luo <luoxhu@linux.ibm.com> Date: Thu Jan 21 21:01:24 2021 -0600 rs6000: Support variable insert and Expand vec_insert in expander [PR79251]
Confirmed. It's likely an endianess issue, I'll have a look first.
Created attachment 54478 [details] untested patch The lvsr and lvsl for generating permutation control vectors only works for LE as the element ordering is different on LE and BE. The proposed patch is to fix gen function for generating permutation control vectors by considering endianness. It can fix the exposed failures on vsx-builtin-{9,10,11,14,16,18}d.c, and a full testing is ongoing.
*** Bug 108814 has been marked as a duplicate of this bug. ***
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>: https://gcc.gnu.org/g:d634e6088f139ee700d79ec73b1ad6436096a6ff commit r13-6994-gd634e6088f139ee700d79ec73b1ad6436096a6ff Author: Kewen Lin <linkw@linux.ibm.com> Date: Mon Apr 3 21:47:54 2023 -0500 rs6000: Fix vector_set_var_p9 by considering BE [PR108807] As PR108807 exposes, the current handling in function rs6000_expand_vector_set_var_p9 doesn't take care of big endianness. Currently the function is to rotate the target vector by moving element to-be-set to element 0, set element 0 with the given val, then rotate back. To get the permutation control vector for the rotation, it makes use of lvsr and lvsl, but the element ordering is different for BE and LE (like element 0 is the most significant one on BE while the least significant one on LE), this patch is to add consideration for BE and make sure permutation control vectors for rotations are expected. As tested, it helped to fix the below failures: FAIL: gcc.target/powerpc/pr79251-run.p9.c execution test FAIL: gcc.target/powerpc/pr89765-mc.c execution test FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test PR target/108807 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_expand_vector_set_var_p9): Fix gen function for permutation control vector by considering big endianness.
Kewen, is this BZ fixed on the trunk? If so we should update the title by dropping the "/13" so that's not flagged as a gcc-13 regression.
(In reply to Jeffrey A. Law from comment #5) > Kewen, is this BZ fixed on the trunk? If so we should update the title by > dropping the "/13" so that's not flagged as a gcc-13 regression. Yes, thanks for reminding and tips! I didn't know this rule before, I had a related question that I'm going to backport the commit to gcc-11/gcc-12 soon, once it's done excepting for marking the status to resolved, should I also drop the remaining "[11/12 regression]"? Or for a bug in resolved status, not dropping it would be fine?
Once you've committed to the active release branches where this bug is active (11/12 in this case), you can just close the bug as resolved/fixed. No need to update the summary/title in that case. Thanks, Jeff
The releases/gcc-12 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>: https://gcc.gnu.org/g:d39451523912981e897faa7942a2634c058524fb commit r12-9405-gd39451523912981e897faa7942a2634c058524fb Author: Kewen Lin <linkw@linux.ibm.com> Date: Mon Apr 3 21:47:54 2023 -0500 rs6000: Fix vector_set_var_p9 by considering BE [PR108807] As PR108807 exposes, the current handling in function rs6000_expand_vector_set_var_p9 doesn't take care of big endianness. Currently the function is to rotate the target vector by moving element to-be-set to element 0, set element 0 with the given val, then rotate back. To get the permutation control vector for the rotation, it makes use of lvsr and lvsl, but the element ordering is different for BE and LE (like element 0 is the most significant one on BE while the least significant one on LE), this patch is to add consideration for BE and make sure permutation control vectors for rotations are expected. As tested, it helped to fix the below failures: FAIL: gcc.target/powerpc/pr79251-run.p9.c execution test FAIL: gcc.target/powerpc/pr89765-mc.c execution test FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test PR target/108807 gcc/ChangeLog: * config/rs6000/rs6000.cc (rs6000_expand_vector_set_var_p9): Fix gen function for permutation control vector by considering big endianness. (cherry picked from commit d634e6088f139ee700d79ec73b1ad6436096a6ff)
The releases/gcc-11 branch has been updated by Kewen Lin <linkw@gcc.gnu.org>: https://gcc.gnu.org/g:043cc707f449076ea704a12fff60e32f5861dfcb commit r11-10627-g043cc707f449076ea704a12fff60e32f5861dfcb Author: Kewen Lin <linkw@linux.ibm.com> Date: Mon Apr 3 21:47:54 2023 -0500 rs6000: Fix vector_set_var_p9 by considering BE [PR108807] As PR108807 exposes, the current handling in function rs6000_expand_vector_set_var_p9 doesn't take care of big endianness. Currently the function is to rotate the target vector by moving element to-be-set to element 0, set element 0 with the given val, then rotate back. To get the permutation control vector for the rotation, it makes use of lvsr and lvsl, but the element ordering is different for BE and LE (like element 0 is the most significant one on BE while the least significant one on LE), this patch is to add consideration for BE and make sure permutation control vectors for rotations are expected. As tested, it helped to fix the below failures: FAIL: gcc.target/powerpc/pr79251-run.p9.c execution test FAIL: gcc.target/powerpc/pr89765-mc.c execution test FAIL: gcc.target/powerpc/vsx-builtin-10d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-11d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-14d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-16d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-18d.c execution test FAIL: gcc.target/powerpc/vsx-builtin-9d.c execution test PR target/108807 gcc/ChangeLog: * config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9): Fix gen function for permutation control vector by considering big endianness. (cherry picked from commit d634e6088f139ee700d79ec73b1ad6436096a6ff)
Fixed on trunk and related release branches.