From 67e5c59afb1696a624bdd2c49ada60db52158af4 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 1 Jun 2018 08:22:13 +0000 Subject: [PATCH] Fix SVE fallout from r260951 2018-06-01 Richard Sandiford 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 | 6 ++++++ gcc/config/aarch64/aarch64.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7adafede7ec..9035e67cd99 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-06-01 Richard Sandiford + + * 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 PR ipa/85960 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index c94f7093b08..98ef45714fd 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -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); -- 2.30.2