aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorKewen Lin <linkw@linux.ibm.com>2023-04-03 21:47:54 -0500
committerKewen Lin <linkw@linux.ibm.com>2023-04-04 00:11:54 -0500
commitd634e6088f139ee700d79ec73b1ad6436096a6ff (patch)
treeb50a65e5b3fc8c1504cd24dd7f7700d0679c2b1a /gcc/fold-const.cc
parentcdd2d6643f7fef40e335a7027edfea7276cde608 (diff)
downloadgcc-d634e6088f139ee700d79ec73b1ad6436096a6ff.zip
gcc-d634e6088f139ee700d79ec73b1ad6436096a6ff.tar.gz
gcc-d634e6088f139ee700d79ec73b1ad6436096a6ff.tar.bz2
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.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions