Skip to content
Snippets Groups Projects
Commit b8ea13eb authored by Richard Biener's avatar Richard Biener Committed by Richard Biener
Browse files

tree-optimization/116274 - overzealous SLP vectorization

The following tries to address that the vectorizer fails to have
precise knowledge of argument and return calling conventions and
views some accesses as loads and stores that are not.
This is mainly important when doing basic-block vectorization as
otherwise loop indexing would force such arguments to memory.

On x86 the reduction in the number of apparent loads and stores
often dominates cost analysis so the following tries to mitigate
this aggressively by adjusting only the scalar load and store
cost, reducing them to the cost of a simple scalar statement,
but not touching the vector access cost which would be much
harder to estimate.  Thereby we error on the side of not performing
basic-block vectorization.

	PR tree-optimization/116274
	* tree-vect-slp.cc (vect_bb_slp_scalar_cost): Cost scalar loads
	and stores as simple scalar stmts when they access a non-global,
	not address-taken variable that doesn't have BLKmode assigned.

	* gcc.target/i386/pr116274-2.c: New testcase.
parent 35f56012
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment