From: Uros Bizjak Date: Tue, 3 May 2016 18:48:18 +0000 (+0200) Subject: predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b38916ad4fe0b878b12c9a42d6983ac09440485;p=gcc.git predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand. * config/i386/predicates.md (x87nonimm_ssenomem_operand): Rename from nonimm_ssenomem_operand. (nonimm_ssenomem_operand): New predicate. * config/i386/i386.md (extendsfdf2): Use nonimm_ssenomem_operand as operand 0 predicate. (*extendsfdf2): Merge from *extendsfdf2_mixed and *extendsfdf2_i387. Disable unsupported alternatives using "enabled" attribute. Use register_ssemem_operand as operand 0 predicate. (*fop__1): Use x87nonimm_ssenomem_operand as operand 1 predicate. From-SVN: r235837 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 69db5dbee7b..b73543cd35d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2016-05-03 Uros Bizjak + + * config/i386/predicates.md (x87nonimm_ssenomem_operand): Rename + from nonimm_ssenomem_operand. + (nonimm_ssenomem_operand): New predicate. + * config/i386/i386.md (extendsfdf2): Use nonimm_ssenomem_operand + as operand 0 predicate. + (*extendsfdf2): Merge from *extendsfdf2_mixed and *extendsfdf2_i387. + Disable unsupported alternatives using "enabled" attribute. + Use register_ssemem_operand as operand 0 predicate. + (*fop__1): Use x87nonimm_ssenomem_operand as operand 1 predicate. + 2016-05-03 Marek Polacek PR c/70859 @@ -48,15 +60,12 @@ SSA names for the result false. (gimplify_call_expr): If the call may return twice do not gimplify parameters into SSA. - (prepare_gimple_addressable): Do not allow an SSA name as - temporary. + (prepare_gimple_addressable): Do not allow an SSA name as temporary. (gimplify_modify_expr): Adjust assert. For noreturn calls with a SSA name LHS adjust its def. - (gimplify_save_expr): Do not allow an SSA name as save-expr - result. + (gimplify_save_expr): Do not allow an SSA name as save-expr result. (gimplify_one_sizepos): Do not allow an SSA name as a sizepos. - (gimplify_body): Init GIMPLE SSA data structures and gimplify - into-SSA. + (gimplify_body): Init GIMPLE SSA data structures and gimplify into-SSA. (gimplify_scan_omp_clauses): Make sure OMP_CLAUSE_SIZE is not an SSA name. Likewise for OMP_CLAUSE_REDUCTION operands. (gimplify_omp_for): Likewise for OMP_CLAUSE_DECL. Likewise @@ -158,7 +167,7 @@ of fixed_reg_set. * df-scan.c (df_insn_refs_collect): Asms may reference global regs. -2016-05-03 bin cheng +2016-05-03 Bin Cheng PR tree-optimization/56541 * doc/invoke.texi (@item max-tree-if-conversion-phi-args): New item. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index be7cfbfd64e..ba1ff8be5da 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -4203,15 +4203,15 @@ "operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));") (define_expand "extendsfdf2" - [(set (match_operand:DF 0 "nonimmediate_operand") + [(set (match_operand:DF 0 "nonimm_ssenomem_operand") (float_extend:DF (match_operand:SF 1 "general_operand")))] - "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)" + "TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)" { /* ??? Needed for compress_float_constant since all fp constants are TARGET_LEGITIMATE_CONSTANT_P. */ if (CONST_DOUBLE_P (operands[1])) { - if ((!TARGET_SSE2 || TARGET_MIX_SSE_I387) + if ((!SSE_FLOAT_MODE_P (DFmode) || TARGET_MIX_SSE_I387) && standard_80387_constant_p (operands[1]) > 0) { operands[1] = simplify_const_unary_operation @@ -4293,11 +4293,11 @@ (set (match_dup 0) (float_extend:DF (match_dup 2)))] "operands[2] = gen_rtx_REG (SFmode, REGNO (operands[0]));") -(define_insn "*extendsfdf2_mixed" - [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m,v") +(define_insn "*extendsfdf2" + [(set (match_operand:DF 0 "nonimm_ssenomem_operand" "=f,m,v") (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f,vm")))] - "TARGET_SSE2 && TARGET_SSE_MATH" + "TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)" { switch (which_alternative) { @@ -4316,18 +4316,16 @@ (set_attr "prefix" "orig,orig,maybe_vex") (set_attr "mode" "SF,XF,DF") (set (attr "enabled") - (cond [(eq_attr "alternative" "0,1") - (symbol_ref "TARGET_MIX_SSE_I387") - ] - (symbol_ref "true")))]) - -(define_insn "*extendsfdf2_i387" - [(set (match_operand:DF 0 "nonimmediate_operand" "=f,m") - (float_extend:DF (match_operand:SF 1 "nonimmediate_operand" "fm,f")))] - "TARGET_80387" - "* return output_387_reg_move (insn, operands);" - [(set_attr "type" "fmov") - (set_attr "mode" "SF,XF")]) + (if_then_else + (match_test ("SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH")) + (if_then_else + (eq_attr "alternative" "0,1") + (symbol_ref "TARGET_MIX_SSE_I387") + (symbol_ref "true")) + (if_then_else + (eq_attr "alternative" "0,1") + (symbol_ref "true") + (symbol_ref "false"))))]) (define_expand "extendxf2" [(set (match_operand:XF 0 "nonimmediate_operand") @@ -4370,9 +4368,9 @@ [(set (match_operand:SF 0 "nonimmediate_operand") (float_truncate:SF (match_operand:DF 1 "nonimmediate_operand")))] - "TARGET_80387 || (TARGET_SSE2 && TARGET_SSE_MATH)" + "TARGET_80387 || (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH)" { - if (TARGET_SSE2 && TARGET_SSE_MATH && !TARGET_MIX_SSE_I387) + if (SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH && !TARGET_MIX_SSE_I387) ; else if (flag_unsafe_math_optimizations) ; @@ -4455,7 +4453,7 @@ [(set (match_operand:SF 0 "nonimmediate_operand" "=fm,v") (float_truncate:SF (match_operand:DF 1 "nonimmediate_operand" "f ,vm")))] - "TARGET_SSE2 && TARGET_SSE_MATH" + "SSE_FLOAT_MODE_P (DFmode) && TARGET_SSE_MATH" { switch (which_alternative) { @@ -9258,8 +9256,7 @@ [(match_operand:MODEF 1 "register_operand" "0,x,0,0")])) (use (match_operand: 2 "nonimmediate_operand" "xm,0,X,X")) (clobber (reg:CC FLAGS_REG))] - "(SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH) - || TARGET_80387" + "TARGET_80387 || (SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH)" "#" [(set (attr "enabled") (if_then_else @@ -14063,9 +14060,9 @@ [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,v") (match_operator:MODEF 3 "binary_fp_operator" [(match_operand:MODEF 1 - "nonimm_ssenomem_operand" "0,fm,0,v") + "x87nonimm_ssenomem_operand" "0,fm,0,v") (match_operand:MODEF 2 - "nonimmediate_operand" "fm,0,xm,vm")]))] + "nonimmediate_operand" "fm,0,xm,vm")]))] "((SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH) || (TARGET_80387 && X87_ENABLE_ARITH (mode))) && !COMMUTATIVE_ARITH_P (operands[3]) diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index b3a471d8b76..dd9c5dca163 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -131,6 +131,14 @@ ;; Match nonimmediate operands, but exclude memory operands ;; for TARGET_SSE_MATH if TARGET_MIX_SSE_I387 is not enabled. (define_predicate "nonimm_ssenomem_operand" + (if_then_else + (and (match_test "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH") + (not (match_test "TARGET_MIX_SSE_I387"))) + (match_operand 0 "register_operand") + (match_operand 0 "nonimmediate_operand"))) + +;; The above predicate, suitable for x87 arithmetic operators. +(define_predicate "x87nonimm_ssenomem_operand" (if_then_else (and (match_test "SSE_FLOAT_MODE_P (mode) && TARGET_SSE_MATH") (not (match_test "TARGET_MIX_SSE_I387 && X87_ENABLE_ARITH (mode)")))