aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.cc
diff options
context:
space:
mode:
authorJeevitha <jeevitha@linux.ibm.com>2023-12-25 04:06:54 -0600
committerJeevitha <jeevitha@linux.ibm.com>2023-12-25 04:06:54 -0600
commit1bbb169fe6f91451a2754f0b86301551db76ceba (patch)
tree194ecd7090fe39a0f3fe1844a4275795660ef3ff /gcc/tree-vect-loop.cc
parent0beeddd6b1b1cb41104c4df925323e8fc0437ba8 (diff)
downloadgcc-1bbb169fe6f91451a2754f0b86301551db76ceba.zip
gcc-1bbb169fe6f91451a2754f0b86301551db76ceba.tar.gz
gcc-1bbb169fe6f91451a2754f0b86301551db76ceba.tar.bz2
rs6000: Change GPR2 to volatile & non-fixed register for function that does not use TOC [PR110320]
Normally, GPR2 is the TOC pointer and is defined as a fixed and non-volatile register. However, it can be used as volatile for PCREL addressing. Therefore, modified r2 to be non-fixed in FIXED_REGISTERS and set it to fixed if it is not PCREL and also when the user explicitly requests TOC or fixed. If the register r2 is fixed, it is made as non-volatile. Changes in register preservation roles can be accomplished with the help of available target hooks (TARGET_CONDITIONAL_REGISTER_USAGE). 2023-12-24 Jeevitha Palanisamy <jeevitha@linux.ibm.com> gcc/ PR target/110320 * config/rs6000/rs6000.cc (rs6000_conditional_register_usage): Change GPR2 to volatile and non-fixed register for PCREL. * config/rs6000/rs6000.h (FIXED_REGISTERS): Modify GPR2 to not fixed. gcc/testsuite/ PR target/110320 * gcc.target/powerpc/pr110320-1.c: New testcase. * gcc.target/powerpc/pr110320-2.c: New testcase. * gcc.target/powerpc/pr110320-3.c: New testcase. Co-authored-by: Peter Bergner <bergner@linux.ibm.com>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions