Fix SVE fallout from r260951
authorRichard Sandiford <richard.sandiford@linaro.org>
Fri, 1 Jun 2018 08:22:13 +0000 (08:22 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 1 Jun 2018 08:22:13 +0000 (08:22 +0000)
2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
Fix subreg tests so that we only return a choice between
GENERAL_REGS and FP_REGS if the original classes included both.

From-SVN: r261057

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 7adafede7ec77c82a18f592371595a0390a975a7..9035e67cd998a89dcf4bc6de8f704d1d77ff0906 100644 (file)
@@ -1,3 +1,9 @@
+2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
+
+       * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
+       Fix subreg tests so that we only return a choice between
+       GENERAL_REGS and FP_REGS if the original classes included both.
+
 2018-06-01  Richard Biener  <rguenther@suse.de>
 
        PR ipa/85960
index c94f7093b0880aee17a4f9b7a3a60b2c27a62f98..98ef45714fd62678a39a10f705f89d322c083c5b 100644 (file)
@@ -1108,12 +1108,12 @@ aarch64_ira_change_pseudo_allocno_class (int regno, reg_class_t allocno_class,
 {
   machine_mode mode;
 
-  if (reg_class_subset_p (allocno_class, GENERAL_REGS)
-      || reg_class_subset_p (allocno_class, FP_REGS))
+  if (!reg_class_subset_p (GENERAL_REGS, allocno_class)
+      || !reg_class_subset_p (FP_REGS, allocno_class))
     return allocno_class;
 
-  if (reg_class_subset_p (best_class, GENERAL_REGS)
-      || reg_class_subset_p (best_class, FP_REGS))
+  if (!reg_class_subset_p (GENERAL_REGS, best_class)
+      || !reg_class_subset_p (FP_REGS, best_class))
     return best_class;
 
   mode = PSEUDO_REGNO_MODE (regno);