rs6000: Guard density_test only for vector version
authorKewen Lin <linkw@linux.ibm.com>
Tue, 11 May 2021 04:01:15 +0000 (23:01 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Tue, 11 May 2021 05:09:37 +0000 (00:09 -0500)
commit1866182f6cf338880c68225d9de571b787b6abcd
tree76a6c69d797a28284d66639a55fcef34c0d21bee
parent096f8215d2172ca4177cb26035e748d8f182fc8f
rs6000: Guard density_test only for vector version

This patch teaches rs6000_density_test to only care about the vector
version cost calculation and early return when calculating the single
scalar iteration cost.

Bootstrapped/regtested on powerpc64le-linux-gnu P9.

gcc/ChangeLog:

* config/rs6000/rs6000.c (struct rs6000_cost_data): New member
costing_for_scalar.
(rs6000_density_test): Early return if costing_for_scalar is true.
(rs6000_init_cost): Init costing_for_scalar of rs6000_cost_data.
gcc/config/rs6000/rs6000.c