+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
{
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);