[Bug target/85945] [6/7/8/9 Regression] ICE in resolve_subreg_use, at lower-subreg.c:751

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 28 14:53:00 GMT 2018


--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is that validate_subreg etc. has a restriction like:
  /* Subregs involving floating point modes are not allowed to
     change size.  Therefore (subreg:DI (reg:DF) 0) is fine, but
     (subreg:SI (reg:DF) 0) isn't.  */
but lower-subreg.c doesn't take that into account in:
         /* We only try to decompose single word subregs of multi-word
             registers.  When we find one, we return -1 to avoid iterating
             over the inner register.

             ??? This doesn't allow, e.g., DImode subregs of TImode values
             on 32-bit targets.  We would need to record the way the
             pseudo-register was used, and only decompose if all the uses
             were the same number and size of pieces.  Hopefully this
             doesn't happen much.  */

          if (outer_words == 1 && inner_words > 1)
              bitmap_set_bit (decomposable_context, regno);
              iter.skip_subrtxes ();
and decompose_register creates concat with a word sized integral pseudos in it.

More information about the Gcc-bugs mailing list