From: Uros Bizjak Date: Wed, 20 Feb 2019 21:58:45 +0000 (+0100) Subject: re PR target/89397 (ICE in build_call_expr_loc_array at gcc/tree.c:11563 since r229082) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c5a32f1ae9300e3fa4c4d8d59bc178aec6600c19;p=gcc.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: r269054 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75ff1342713..f164119e29b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2019-02-20 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-20 David Malcolm PR c/89410 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 591a7cdccdc..a58ddca3fab 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -39215,7 +39215,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); @@ -50681,7 +50681,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. */ @@ -50689,7 +50689,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) @@ -50724,7 +50724,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); @@ -51014,7 +51014,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 8036136752a..ac299495b2c 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1972,7 +1972,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; @@ -1983,7 +1983,7 @@ (unspec:V16SF [(match_operand:V16SF 1 "vector_operand")] UNSPEC_RSQRT28))] - "TARGET_SSE_MATH && TARGET_AVX512ER" + "TARGET_AVX512ER && TARGET_SSE_MATH" { ix86_emit_swsqrtsf (operands[0], operands[1], V16SFmode, true); DONE;