aboutsummaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-21 11:13:29 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-21 11:13:29 +0100
commit108b83c1fd97b06f1e99ffb5127f2c5b9623bb11 (patch)
treebb44018dd9514fa956a3334a46e94024ad688eff /gcc/simplify-rtx.c
parentad6aec7153adf13f50c3e7ef27080ab002f148b5 (diff)
downloadgcc-108b83c1fd97b06f1e99ffb5127f2c5b9623bb11.zip
gcc-108b83c1fd97b06f1e99ffb5127f2c5b9623bb11.tar.gz
gcc-108b83c1fd97b06f1e99ffb5127f2c5b9623bb11.tar.bz2
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
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c4
1 files changed, 3 insertions, 1 deletions
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.