diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2024-07-07 22:38:34 -0500 |
---|---|---|
committer | Kewen Lin <linkw@gcc.gnu.org> | 2024-07-07 22:38:34 -0500 |
commit | f90ca62566c1d20da585d95ced99f6a1903fc2cc (patch) | |
tree | ddd77ac511abd5cfcbfaf5d0dbf23429a09d5d17 /gcc/tree-pass.h | |
parent | a910c30c7c27cd0f6d2d2694544a09fb11d611b9 (diff) | |
download | gcc-f90ca62566c1d20da585d95ced99f6a1903fc2cc.zip gcc-f90ca62566c1d20da585d95ced99f6a1903fc2cc.tar.gz gcc-f90ca62566c1d20da585d95ced99f6a1903fc2cc.tar.bz2 |
rs6000: Consider explicit VSX when masking off ALTIVEC [PR115688]
PR115688 exposes an inconsistent state in which we have VSX
enabled but ALTIVEC disabled. There is one hunk:
if (main_target_opt && !main_target_opt->x_rs6000_altivec_abi)
rs6000_isa_flags &= ~((OPTION_MASK_VSX | OPTION_MASK_ALTIVEC)
& ~rs6000_isa_flags_explicit);
which disables both VSX and ALTIVEC together only considering
them explicitly set or not. For the given case, VSX is explicitly
specified, altivec is implicitly enabled as it's part of set
ISA_2_6_MASKS_SERVER. When falling into the above hunk, vsx is
kept as it's explicitly enabled but altivec gets masked off, it's
unexpected.
This patch is to consider explicit VSX when masking off ALTIVEC,
not mask off it if TARGET_VSX and it's explicitly set.
PR target/115688
gcc/ChangeLog:
* config/rs6000/rs6000.cc (rs6000_option_override_internal): Consider
explicit VSX when masking off ALTIVEC.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr115688.c: New test.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions