public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] punish reload of lfiwzx when loading an int variable [PR102169, PR102146]
@ 2021-09-29  8:32 HAO CHEN GUI
  2021-10-11  5:46 ` Ping^1 " HAO CHEN GUI
  2021-10-14  0:12 ` Segher Boessenkool
  0 siblings, 2 replies; 4+ messages in thread
From: HAO CHEN GUI @ 2021-09-29  8:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: Bill Schmidt, Segher Boessenkool

Hi,

   The patch punishes reload of alternative pair of "d, Z" for movsi_internal1. The reload occurs if 'Z' doesn't match and generates an additional insn. So the memory reload should be punished.

   Bootstrapped and tested on powerpc64le-linux with no regressions. Is this okay for trunk? Any recommendations? Thanks a lot.


ChangeLog

2021-09-29 Haochen Gui <guihaoc@linux.ibm.com>

gcc/
         * gcc/config/rs6000/rs6000.md (movsi_internal1): disparages
         slightly the alternative 'Z' of "lfiwzx" when reload is needed.

patch.diff

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 6bec2bddbde..c961f2df4a7 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -7341,7 +7341,7 @@ (define_insn "*movsi_internal1"
            r,          *h,         *h")
         (match_operand:SI 1 "input_operand"
           "r,          U,
-          m,          Z,          Z,
+          m,          ^Z,         Z,
            r,          d,          v,
            I,          L,          eI,         n,
            wa,         O,          wM,         wB,


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-14  8:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-29  8:32 [PATCH, rs6000] punish reload of lfiwzx when loading an int variable [PR102169, PR102146] HAO CHEN GUI
2021-10-11  5:46 ` Ping^1 " HAO CHEN GUI
2021-10-14  0:12 ` Segher Boessenkool
2021-10-14  8:37   ` HAO CHEN GUI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).