re PR rtl-optimization/84157 ([nvptx] ICE: RTL check: expected code 'reg', have ...
authorUros Bizjak <ubizjak@gmail.com>
Thu, 1 Feb 2018 16:04:18 +0000 (17:04 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 1 Feb 2018 16:04:18 +0000 (17:04 +0100)
PR rtl-optimization/84157
* combine.c (change_zero_ext): Use REG_P predicate in
front of HARD_REGISTER_P predicate.

From-SVN: r257302

gcc/ChangeLog
gcc/combine.c

index 4dcc3644f366ebbe8ba28edfae9a481f678b8451..2f44038f514a392dbff43de5848d5be68b06212f 100644 (file)
@@ -1,3 +1,9 @@
+2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR rtl-optimization/84157
+       * combine.c (change_zero_ext): Use REG_P predicate in
+       front of HARD_REGISTER_P predicate.
+
 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
 
        * config/avr/avr.c (avr_option_override): Move disabling of
index 970dd26778e80c2dbb51969ddb7ecb4618ffad6b..a9929f2a3e2d988d1388213bc932eb1d6a4b4184 100644 (file)
@@ -11483,7 +11483,7 @@ change_zero_ext (rtx pat)
 
          if (mode != inner_mode)
            {
-             if (HARD_REGISTER_P (x)
+             if (REG_P (x) && HARD_REGISTER_P (x)
                  && !can_change_dest_mode (x, 0, mode))
                continue;
 
@@ -11501,7 +11501,7 @@ change_zero_ext (rtx pat)
          x = SUBREG_REG (XEXP (x, 0));
          if (GET_MODE (x) != mode)
            {
-             if (HARD_REGISTER_P (x)
+             if (REG_P (x) && HARD_REGISTER_P (x)
                  && !can_change_dest_mode (x, 0, mode))
                continue;