[PATCH] combine: Check for paradoxical subreg

Robin Dapp rdapp@linux.ibm.com
Wed Jun 23 11:33:48 GMT 2021


Hi,

while evaluating another patch that introduces more lvalue paradoxical 
subregs I ran into an ICE in combine at

  	  wide_int o = wi::insert (rtx_mode_t (outer, temp_mode),
				   rtx_mode_t (inner, dest_mode),
				   offset, width);

because width (=GET_MODE_PRECISION (dest_mode)) > GET_MODE_PRECISION 
(temp_mode).

 From the comments and the code it looks like we do not want to handle a 
paradoxical subreg here so I quickly added a check for it which prevents 
the ICE.  The check could also be added to reg_subword_p () I guess.

Is this the right thing to do or am I missing something, i.e. my other 
patch might be doing something it should not?

Bootstrap on s390x was successful and testsuite is looking good so far.

Regards
  Robin

--

gcc/ChangeLog:

         * combine.c (try_combine): Check for paradoxical subreg.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-combine-paradoxical-subreg-fix.patch
Type: text/x-patch
Size: 950 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210623/b54b6ffb/attachment.bin>


More information about the Gcc-patches mailing list