This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR91790 by considering different first_stmt_info for realign


Hi,

As PR91790 exposed, when we have one slp node whose first_stmt_info_for_drptr
is different from first_stmt_info, it's possible that the first_stmt DR isn't
initialized yet before stmt SLP_TREE_SCALAR_STMTS[0] of slp node. So we
shouldn't use first_stmt_info for vect_setup_realignment, instead we can use
the one based on first_stmt_info_for_drptr DR with additional adjustment by
bumping the distance from first_stmt DR.

Bootstrapped and tested on powerpc64le-linux-gnu (P8LE) and
ppc64-redhat-linux (P7BE) which need to use realign_load.

Is it ok for trunk? and backport to GCC 9 after some burn-in time?

BR,
Kewen

----

gcc/ChangeLog

2019-11-27  Kewen Lin  <linkw@gcc.gnu.org>

	PR tree-optimization/91790
	* gcc/tree-vect-stmts.c (vectorizable_load): Use the adjusted DR for
	vect_setup_realignment when first_stmt_info is different from
	first_stmt_info_for_drptr.

Attachment: realign.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]