aarch64: Cost comparisons embedded in COND_EXPRs
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 26 Mar 2021 16:08:36 +0000 (16:08 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 26 Mar 2021 16:08:36 +0000 (16:08 +0000)
commit99f94ae5018e915d0c1db1b6d4110d68bc4d242e
tree31a7f223f3c1ae9721ab60e97b6353070631b75a
parented17ad5ea1cb302951f582ae8edd1afc9c014302
aarch64: Cost comparisons embedded in COND_EXPRs

So far the costing of COND_EXPRs hasn't distinguished between
cases in which the condition is calculated separately or is
built into the COND_EXPR itself.  This patch adds the cost
of any embedded comparison.

Like with the 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_embedded_comparison_type): New
function.
(aarch64_adjust_stmt_cost): Add the costs of embedded scalar and
vector comparisons.
gcc/config/aarch64/aarch64.c