aarch64: Detect scalar extending loads
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 26 Mar 2021 16:08:35 +0000 (16:08 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 26 Mar 2021 16:08:35 +0000 (16:08 +0000)
commited17ad5ea1cb302951f582ae8edd1afc9c014302
tree90d197312848ad2e5c486366b558faa4a850b79f
parent3b924b0d7c0218956dbc2ce0ca2740e8923c2c4a
aarch64: Detect scalar extending loads

If the scalar code does an integer load followed by an integer
extension, we've tended to cost that as two separate operations,
even though the extension is probably going to be free in practice.
This patch treats the extension as having zero cost, like we already
do for extending SVE loads.

Like with previous patches, this one only becomes active if
a CPU selects use_new_vector_costs.  It should therefore have
a very low impact on other CPUs.

gcc/
* config/aarch64/aarch64.c (aarch64_detect_scalar_stmt_subtype):
New function.
(aarch64_add_stmt_cost): Call it.
gcc/config/aarch64/aarch64.c