From: Richard Sandiford Date: Tue, 24 Jul 2018 18:08:19 +0000 (+0000) Subject: Avoid &LOOP_VINFO_MASKS for bb vectorisation (PR 86618) X-Git-Tag: upstream/12.2.0~30203 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ed623edb473d862673fc0bbc6b878074667ca5fb;p=platform%2Fupstream%2Fgcc.git Avoid &LOOP_VINFO_MASKS for bb vectorisation (PR 86618) r262589 introduced another instance of the bug fixed in r258131. 2018-07-23 Richard Sandiford 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. From-SVN: r262951 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02991c1..96c7de9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-07-24 Richard Sandiford + + 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. + 2018-07-24 David Malcolm PR tree-optimization/86636 diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 1c847ae..f420a42 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3337,7 +3337,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt, 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;