]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Disable mode promotion for pseudos
authorHaochen Gui <guihaoc@gcc.gnu.org>
Fri, 4 Jun 2021 06:38:53 +0000 (14:38 +0800)
committerSegher Boessenkool <segher@kernel.crashing.org>
Mon, 30 Aug 2021 09:36:57 +0000 (09:36 +0000)
commit5803a97319245cf7942e544a7be7b24821dc7c9e
tree27f1e81d17f13d77e0b802db7eb0694f93b85565
parent5f5f8f39afc8b5219d9513180a3fa66f9b72ed75
rs6000: Disable mode promotion for pseudos

rs6000 has instructions that can do almost everything 32 bit
at least as efficiently as corresponding 64 bit things. The
mode promotion can be defered to when a wide mode is necessary.
So it helps a lot not promote mode for pseudos. SPECint test
shows that the overall performance improvement (by geomean) is
more than 2% with this patch.

testsuite/gcc.target/powerpc/not-promote-mode.c illustrates how
the patch eliminates the redundant extensions and do further
optimization by disabling mode promotion for pseduos.

gcc/ChangeLog

* config/rs6000/rs6000.h (PROMOTE_MODE): Remove.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/not-promote-mode.c: New.

(cherry picked from commit 9080a3bf23297885fdc47221da37a71d6dec93c5)
gcc/config/rs6000/rs6000.h
gcc/testsuite/gcc.target/powerpc/not-promote-mode.c [new file with mode: 0644]