]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Move the hunk affecting VSX/ALTIVEC ahead [PR103627]
authorKewen Lin <linkw@linux.ibm.com>
Mon, 7 Feb 2022 03:30:02 +0000 (21:30 -0600)
committerKewen Lin <linkw@linux.ibm.com>
Tue, 15 Feb 2022 09:49:07 +0000 (03:49 -0600)
commit99ac7ce34348889125230687d8277cd1df22027a
treea59d340872f7d4ac9ec72c62f57c8891b4146757
parent7ed740240657cc35f02130a412938d209ff24496
rs6000: Move the hunk affecting VSX/ALTIVEC ahead [PR103627]

The modified hunk can update VSX and ALTIVEC flag, we have some codes
to check/warn for some flags related to VSX and ALTIVEC sitting where
the hunk is proprosed to be moved to.  Without this adjustment, the
VSX and ALTIVEC update is too late, it can cause the incompatibility
and result in unexpected behaviors, the associated test case is one
typical case.

Since we already have the code which sets TARGET_FLOAT128_TYPE and lays
after the moved place, and OPTION_MASK_FLOAT128_KEYWORD will rely on
TARGET_FLOAT128_TYPE, so it just simply remove them.

gcc/ChangeLog:

PR target/103627
* config/rs6000/rs6000.c (rs6000_option_override_internal): Move the
hunk affecting VSX and ALTIVEC to appropriate place.

gcc/testsuite/ChangeLog:

PR target/103627
* gcc.target/powerpc/pr103627-3.c: New test.

(cherry picked from commit e66ba0f55c000152df63fc67c11a64f79122ef86)
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr103627-3.c [new file with mode: 0644]