]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
combine: Check for paradoxical subreg.
authorRobin Dapp <rdapp@linux.ibm.com>
Tue, 8 Feb 2022 13:39:16 +0000 (14:39 +0100)
committerRobin Dapp <rdapp@linux.ibm.com>
Tue, 8 Feb 2022 14:28:53 +0000 (15:28 +0100)
This adds a check for a paradoxical subreg in reg_subword_p ()
in order to prevent an ICE on s390 in try_combine () triggered
by the movqicc expander.

gcc/ChangeLog:

* combine.cc (reg_subword_p): Check for paradoxical subreg.

gcc/combine.cc

index 7683f8250fe269bb99d46dedd7631166267552d3..c264ededf20a9047fa84e48e5dd9ffef4038ca8b 100644 (file)
@@ -2411,6 +2411,7 @@ reg_subword_p (rtx x, rtx reg)
     x = XEXP (x, 0);
 
   return GET_CODE (x) == SUBREG
+        && !paradoxical_subreg_p (x)
         && SUBREG_REG (x) == reg
         && GET_MODE_CLASS (GET_MODE (x)) == MODE_INT;
 }