Segher,
I committed two patches (r12-1201 and r12-1202) into trunk. Thanks
for your review and advice.
On 4/6/2021 上午 1:36, Segher Boessenkool wrote:
Hi!
On Thu, May 20, 2021 at 05:49:49PM +0800, HAO CHEN GUI wrote:
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.
I'd still like to see if (and why) this works better than explicitly
promoting QImode and HImode here. But that can be done later.
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/not-promote-mode.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
Just
/* { dg-do compile { target lp64 } } */
because the rest is already implied by this being in gcc.target/powerpc .
The patch is okay for trunk. Thank you very much for finding this huge
performance gain!
Segher