From: Uros Bizjak Date: Wed, 27 Feb 2019 19:33:15 +0000 (+0100) Subject: re PR target/89397 (ICE in build_call_expr_loc_array at gcc/tree.c:11563 since r229082) X-Git-Tag: releases/gcc-7.5.0~568 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e053aaac5065fe39eaff06641fd9f7607be6945e;p=thirdparty%2Fgcc.git re PR target/89397 (ICE in build_call_expr_loc_array at gcc/tree.c:11563 since r229082) PR target/89397 * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check TARGET_SSE in addition to TARGET_SSE_MATH. (ix86_excess_precision): Ditto. (ix86_float_exceptions_rounding_supported_p): Ditto. (use_rsqrt_p): Ditto. * config/i386/sse.md (rsqrt2): Ditto. From-SVN: r269263 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b67c274dcb1d..767ee94d8c2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-02-27 Uroš Bizjak + + PR target/89397 + * config/i386/i386.c (ix86_atomic_assign_expand_fenv): Check + TARGET_SSE in addition to TARGET_SSE_MATH. + + (ix86_excess_precision): Ditto. + (ix86_float_exceptions_rounding_supported_p): Ditto. + (use_rsqrt_p): Ditto. + * config/i386/sse.md (rsqrt2): Ditto. + 2019-02-15 Martin Liska Backport from mainline diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ea1c2e775fde..dfd489c343cb 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -40500,7 +40500,7 @@ ix86_vectorize_builtin_scatter (const_tree vectype, static bool use_rsqrt_p () { - return (TARGET_SSE_MATH + return (TARGET_SSE && TARGET_SSE_MATH && flag_finite_math_only && !flag_trapping_math && flag_unsafe_math_optimizations); @@ -51955,7 +51955,7 @@ ix86_float_exceptions_rounding_supported_p (void) there is no adddf3 pattern (since x87 floating point only has XFmode operations) so the default hook implementation gets this wrong. */ - return TARGET_80387 || TARGET_SSE_MATH; + return TARGET_80387 || (TARGET_SSE && TARGET_SSE_MATH); } /* Implement TARGET_ATOMIC_ASSIGN_EXPAND_FENV. */ @@ -51963,7 +51963,7 @@ ix86_float_exceptions_rounding_supported_p (void) static void ix86_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) { - if (!TARGET_80387 && !TARGET_SSE_MATH) + if (!TARGET_80387 && !(TARGET_SSE && TARGET_SSE_MATH)) return; tree exceptions_var = create_tmp_var_raw (integer_type_node); if (TARGET_80387) @@ -51998,7 +51998,7 @@ ix86_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update) tree update_fldenv = build_call_expr (fldenv, 1, fenv_addr); *update = build2 (COMPOUND_EXPR, void_type_node, *update, update_fldenv); } - if (TARGET_SSE_MATH) + if (TARGET_SSE && TARGET_SSE_MATH) { tree mxcsr_orig_var = create_tmp_var_raw (unsigned_type_node); tree mxcsr_mod_var = create_tmp_var_raw (unsigned_type_node); @@ -52357,7 +52357,7 @@ ix86_excess_precision (enum excess_precision_type type) return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; else if (!TARGET_MIX_SSE_I387) { - if (!TARGET_SSE_MATH) + if (!(TARGET_SSE && TARGET_SSE_MATH)) return FLT_EVAL_METHOD_PROMOTE_TO_LONG_DOUBLE; else if (TARGET_SSE2) return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 79a83f6ea79e..cb4214cad8d8 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1777,7 +1777,7 @@ [(set (match_operand:VF1_128_256 0 "register_operand") (unspec:VF1_128_256 [(match_operand:VF1_128_256 1 "vector_operand")] UNSPEC_RSQRT))] - "TARGET_SSE_MATH" + "TARGET_SSE && TARGET_SSE_MATH" { ix86_emit_swsqrtsf (operands[0], operands[1], mode, true); DONE;