]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Apply split_DI_SF_DF_const() even if TARGET_CONST16 or TARGET_AUTOLITPOOLS
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Thu, 9 Oct 2025 21:26:54 +0000 (06:26 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 20 Oct 2025 16:34:38 +0000 (09:34 -0700)
Otherwise, if TARGET_CONST16 or TARGET_AUTOLITPOOLS is enabled, DI/SF/DFmode
constant assignments will not benefit from their splitting or constantsynth.

gcc/ChangeLog:

* config/xtensa/xtensa.cc (do_largeconst):
Change split_DI_SF_DF_const() to be called unconditionally.

gcc/config/xtensa/xtensa.cc

index 33e52a285b1e28895c6a09761733b0ca4bde6ef1..4ece2cacb38b353fd6b4e8ea5bf60f1374d1cd3f 100644 (file)
@@ -5754,11 +5754,10 @@ split_DI_SF_DF_const (rtx_insn *insn)
 /* The constant-synthesis optimization (constantsynth for short).
 
    This is an optimization that attempts to replace the assignment of a
-   large integer (and some single-precision floating-point) constant value
-   that won't fit in the immediate field of a single machine instruction
-   with a smaller integer value that does fit, and a group of subsequent
-   instructions that derive the equivalent value through some arithmetic/
-   bitwise operations.
+   large integer constant value that won't fit in the immediate field of
+   a single machine instruction with a smaller integer value that does fit,
+   and a group of subsequent instructions that derive the equivalent value
+   through some arithmetic/bitwise operations.
 
    In Xtensa ISA, when TARGET_CONST16 is not enabled, such large immediate
    assignments are typically treated as references to literal pool entries
@@ -6265,8 +6264,7 @@ do_largeconst (void)
        /* Split DI/SF/DFmode constant assignments into pairs of SImode
           ones.  This is also the pre-processing for constantsynth opti-
           mization that follows immediately after.  */
-       if (replacing_required)
-         split_DI_SF_DF_const (insn);
+       split_DI_SF_DF_const (insn);
 
        /* constantsynth pass 1.
           Detect and record large constant assignments within a function.  */