]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
recog.c (scratch_operand): Do not simply allow all hard registers: only allow those...
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 19 Sep 2014 16:42:26 +0000 (18:42 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 19 Sep 2014 16:42:26 +0000 (18:42 +0200)
2014-09-19  Segher Boessenkool  <segher@kernel.crashing.org>

* recog.c (scratch_operand): Do not simply allow all hard registers:
only allow those that are allocatable.

From-SVN: r215399

gcc/ChangeLog
gcc/recog.c

index 261eda3bc95ce7657fd9bf3d502952521c413f37..22b068d1cc5690f07ee6b9c63b47ae41f60ccce3 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * recog.c (scratch_operand): Do not simply allow all hard registers:
+       only allow those that are allocatable.
+
 2014-09-19  Felix Yang  <felix.yang@huawei.com>
 
        * cfgrtl.c ira.c ira-color.c ira-conflicts ira-lives.c: Update
index b1838094cc1bdddcd4b38e9b578c390a2c86ae4e..5ee3816c7cfdb3e63ebe3f95c9820b07ceebc4a8 100644 (file)
@@ -1143,7 +1143,9 @@ scratch_operand (rtx op, enum machine_mode mode)
 
   return (GET_CODE (op) == SCRATCH
          || (REG_P (op)
-             && (lra_in_progress || REGNO (op) < FIRST_PSEUDO_REGISTER)));
+             && (lra_in_progress
+                 || (REGNO (op) < FIRST_PSEUDO_REGISTER
+                     && REGNO_REG_CLASS (REGNO (op)) != NO_REGS))));
 }
 
 /* Return 1 if OP is a valid immediate operand for mode MODE.