From 108b83c1fd97b06f1e99ffb5127f2c5b9623bb11 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 21 Mar 2018 11:13:29 +0100 Subject: re PR rtl-optimization/84989 (_mm512_broadcast_f32x4 triggers ICE in simplify_const_unary_operation, at simplify-rtx.c:1731) PR rtl-optimization/84989 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify VEC_DUPLICATE with scalar result mode. * gcc.target/i386/pr84989.c: New test. From-SVN: r258709 --- gcc/simplify-rtx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/simplify-rtx.c') diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 2e7aa5c..23244a1 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1692,7 +1692,9 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op) break; } - if (VECTOR_MODE_P (mode) && vec_duplicate_p (op, &elt)) + if (VECTOR_MODE_P (mode) + && vec_duplicate_p (op, &elt) + && code != VEC_DUPLICATE) { /* Try applying the operator to ELT and see if that simplifies. We can duplicate the result if so. -- cgit v1.1