[Bug target/104581] [12 Regression] Huge compile-time regression building SPEC 2017 538.imagick_r with PGO

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 17 12:43:19 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104581

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |hjl.tools at gmail dot com
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
For just the special-case of AVX loads from constant zero this is a quite
expensive thing to do.

diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index cf246e74e57..e4b42fbba6f 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -14520,11 +14452,7 @@ ix86_avx_u128_mode_needed (rtx_insn *insn)
        {
          FOR_EACH_SUBRTX (iter, array, src, NONCONST)
            if (ix86_check_avx_upper_register (*iter))
-             {
-               int status = ix86_avx_u128_mode_source (insn, *iter);
-               if (status == AVX_U128_DIRTY)
-                 return status;
-             }
+             return AVX_U128_DIRTY;
        }

       /* This isn't YMM/ZMM load/store.  */

fixes this and makes the compile finish in 16s.


More information about the Gcc-bugs mailing list