This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Avoid &LOOP_VINFO_MASKS for bb vectorisation (PR 86618)
- From: Richard Sandiford <richard dot sandiford at arm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Jul 2018 19:08:32 +0100
- Subject: Avoid &LOOP_VINFO_MASKS for bb vectorisation (PR 86618)
r262589 introduced another instance of the bug fixed in r258131.
Tested on aarch64-linux-gnu and applied as obvious.
Richard
2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/86618
* tree-vect-stmts.c (vectorizable_call): Don't take the address
of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c 2018-07-24 19:03:04.000000000 +0100
+++ gcc/tree-vect-stmts.c 2018-07-24 19:03:23.521825230 +0100
@@ -3337,7 +3337,7 @@ vectorizable_call (gimple *gs, gimple_st
needs to be generated. */
gcc_assert (ncopies >= 1);
- vec_loop_masks *masks = &LOOP_VINFO_MASKS (loop_vinfo);
+ vec_loop_masks *masks = (loop_vinfo ? &LOOP_VINFO_MASKS (loop_vinfo) : NULL);
if (!vec_stmt) /* transformation not required. */
{
STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;