From: Uros Bizjak Date: Tue, 24 May 2016 15:42:17 +0000 (+0200) Subject: i386.c (ix86_preferred_reload_class): Use IS_STACK_MODE, INTEGER_CLASS_P, FLOAT_CLASS... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4b63ff589443463a8ad12d3ad814867dc1d51fb7;p=gcc.git i386.c (ix86_preferred_reload_class): Use IS_STACK_MODE, INTEGER_CLASS_P, FLOAT_CLASS_P and Q_CLASS_P macros. * config/i386/i386.c (ix86_preferred_reload_class): Use IS_STACK_MODE, INTEGER_CLASS_P, FLOAT_CLASS_P and Q_CLASS_P macros. From-SVN: r236645 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 45313abff88..0ca7e794ef7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -124,8 +124,8 @@ 2016-05-24 Kugan Vivekanandarajah PR middle-end/71252 - * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Add stmt_to_insert after - build_and_add_sum creates new use stmt. + * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Add stmt_to_insert + after build_and_add_sum creates new use stmt. 2016-05-24 Richard Sandiford @@ -157,7 +157,8 @@ (add_to_ops_vec): Add stmt_to_insert. (add_repeat_to_ops_vec): Init stmt_to_insert. (insert_stmt_before_use): New. - (transform_add_to_multiply): Remove mult_stmt insertion and add it to ops vector. + (transform_add_to_multiply): Remove mult_stmt insertion and add it + to ops vector. (get_ops): Init stmt_to_insert. (maybe_optimize_range_tests): Likewise. (rewrite_expr_tree): Insert stmt_to_insert before use stmt. @@ -190,8 +191,8 @@ TARGET_MIX_SSE_I387. Rewrite using X87_FLOAT_MODE_P and SSE_FLOAT_MODE_P macros. * config/i386/i386.c (ix86_preferred_reload_class): Use - IS_STACK_MODE, INTEGER_CLASS_P and FLOAT_CLASS_P macros. Cleanup - regclass processing for CONST_DOUBLE_P. + IS_STACK_MODE, INTEGER_CLASS_P, FLOAT_CLASS_P and Q_CLASS_P macros. + Cleanup regclass processing for CONST_DOUBLE_P. (ix86_preferred_output_reload_class): Use IS_STACK_MODE macro. (ix86_rtx_costs): Remove redundant TARGET_80387 check with IS_STACK_MODE macro. @@ -278,9 +279,9 @@ 2016-05-22 Kugan Vivekanandarajah PR middle-end/40921 - * tree-ssa-reassoc.c (try_special_add_to_ops): New. - (linearize_expr_tree): Call try_special_add_to_ops. - (reassociate_bb): Convert MULT_EXPR by (-1) to NEGATE_EXPR. + * tree-ssa-reassoc.c (try_special_add_to_ops): New. + (linearize_expr_tree): Call try_special_add_to_ops. + (reassociate_bb): Convert MULT_EXPR by (-1) to NEGATE_EXPR. 2016-05-21 Senthil Kumar Selvaraj diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c474bb5c37e..51364f3f50f 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -43334,17 +43334,18 @@ ix86_preferred_reload_class (rtx x, reg_class_t regclass) (plus soft-fp const_int). Which can only be computed into general regs. */ if (GET_CODE (x) == PLUS) - return reg_class_subset_p (regclass, GENERAL_REGS) ? regclass : NO_REGS; + return INTEGER_CLASS_P (regclass) ? regclass : NO_REGS; /* QImode constants are easy to load, but non-constant QImode data must go into Q_REGS. */ if (GET_MODE (x) == QImode && !CONSTANT_P (x)) { - if (reg_class_subset_p (regclass, Q_REGS)) + if (Q_CLASS_P (regclass)) return regclass; - if (reg_class_subset_p (Q_REGS, regclass)) + else if (reg_class_subset_p (Q_REGS, regclass)) return Q_REGS; - return NO_REGS; + else + return NO_REGS; } return regclass;