]> git.ipfire.org Git - thirdparty/gcc.git/commit
[aarch64] check for non-NULL vectype in aarch64_vector_costs::add_stmt_cost
authorRichard Biener <rguenther@suse.de>
Tue, 22 Jul 2025 13:04:16 +0000 (15:04 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 23 Jul 2025 06:52:33 +0000 (08:52 +0200)
commit9a8d91219d65f7cb304b1d678957f95061bfe02b
treecbc47f80f06e927c3bc11bc39e8785bb57f2457a
parent6acf9501771b8a26643fe6b887eb2d9b6d008b47
[aarch64] check for non-NULL vectype in aarch64_vector_costs::add_stmt_cost

With a patch still in development we get NULL STMT_VINFO_VECTYPE.
One side-effect is that during scalar stmt testing we no longer
pass a vectype.  The following adjusts aarch64_vector_costs::add_stmt_cost
to check for a non-NULL vectype before accessing it, like all the
code surrounding it.  The other fix possibility would have been
to re-orderr the check with the vect_mem_access_type one, but that
one is not going to exist during scalar code costing either in the
future.

* config/aarch64/aarch64.cc (aarch64_vector_costs::add_stmt_cost):
Check vectype is non-NULL before accessing it.
gcc/config/aarch64/aarch64.cc