From 6a5cdb0e9e1294a72f3be8237f8e48c86c8b8dba Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 11 Feb 2017 09:15:30 +0100 Subject: [PATCH] re PR middle-end/79454 (c-c++-common/ubsan/overflow-vec-*.c FAILs on some 64-bit BE targets) PR middle-end/79454 * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise result computation whenever lhs doesn't have vector mode, not just when it has BLKmode. From-SVN: r245354 --- gcc/ChangeLog | 7 +++++++ gcc/internal-fn.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54965929ef6..f37f49c1b12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-02-11 Jakub Jelinek + + PR middle-end/79454 + * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise + result computation whenever lhs doesn't have vector mode, not + just when it has BLKmode. + 2017-02-10 Gerald Pfeifer * doc/makefile.texi (profiledbootstrap): Refer to the diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 1ccc803631a..1d84b260bf1 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -1909,7 +1909,7 @@ expand_vector_ubsan_overflow (location_t loc, enum tree_code code, tree lhs, { optab op; lhsr = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); - if (GET_MODE (lhsr) == BLKmode + if (!VECTOR_MODE_P (GET_MODE (lhsr)) || (op = optab_for_tree_code (code, TREE_TYPE (arg0), optab_default)) == unknown_optab || (optab_handler (op, TYPE_MODE (TREE_TYPE (arg0))) -- 2.30.2