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

            Bug ID: 92213
           Summary: internal compiler error: in lra_assign, at
                    lra-assigns.c:1647
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: vmakarov at redhat dot com
  Target Milestone: ---

When enabling mask register spill with:

@@ -21452,6 +21442,13 @@ ix86_get_mask_mode (poly_uint64 nunits, poly_uint64
vector_size)
 static reg_class_t
 ix86_spill_class (reg_class_t rclass, machine_mode mode)
 {
+  if (TARGET_AVX512BW
+      && (mode == QImode
+    || mode == HImode
+    || mode == SImode
+    || (TARGET_64BIT && mode == DImode))
+      && MAYBE_INTEGER_CLASS_P (rclass))
+    return ALL_MASK_REGS;
   if (0 && TARGET_GENERAL_REGS_SSE_SPILL
       && TARGET_SSE2
       && TARGET_INTER_UNIT_MOVES_TO_VEC

I ran into

during RTL pass: reload
source/grid/tria.cc: In function 'execute_refinement':
source/grid/tria.cc:9243:4: internal compiler error: in lra_assign, at
lra-assigns.c:1647
 9243 |    }
      |    ^
0xa45159 lra_assign(bool&)
        /export/gnu/import/git/intel/gcc-tuning/gcc/lra-assigns.c:1647
0xa3fb4d lra(_IO_FILE*)
        /export/gnu/import/git/intel/gcc-tuning/gcc/lra.c:2482
0x9fc3f1 do_reload
        /export/gnu/import/git/intel/gcc-tuning/gcc/ira.c:5511
0x9fc3f1 execute
        /export/gnu/import/git/intel/gcc-tuning/gcc/ira.c:5697
Please submit a full bug report,

from

 if (! lra_asm_error_p && flag_checking)
    /* Check correctness of allocation for call-crossed pseudos but
       only when there are no asm errors as in the case of errors the
       asm is removed and it can result in incorrect allocation.  */
    for (i = FIRST_PSEUDO_REGISTER; i < max_regno; i++) 
      if (lra_reg_info[i].nrefs != 0 
          && reg_renumber[i] >= 0 
          && overlaps_hard_reg_set_p (lra_reg_info[i].conflict_hard_regs,
                                      PSEUDO_REGNO_MODE (i), reg_renumber[i]))
        gcc_unreachable ();


LRA calls

Check for conflict
assign_by_spills  <<<<< Assign mask register k0 to a pseudo
...
assign_spill_hard_regs <<<< Assign mask register k0 to a different pseudo
...
Check for conflict <<< internal compiler error
assign_by_spills

assign_spill_hard_regs fails to notice that k0 has been assigned to
a pseudo.

Reply via email to