]> git.ipfire.org Git - thirdparty/gcc.git/commit
properly compute fp/mode for scalar ops for vectorizer costing
authorRichard Biener <rguenther@suse.de>
Thu, 10 Jul 2025 11:30:30 +0000 (13:30 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 11 Jul 2025 08:41:57 +0000 (10:41 +0200)
commit363b29a9cfbb470d6987fb395035c56bae30c64b
tree3edfe6e4d846917f3ffa27061426f08ac9c321b3
parent3e7dd06860bf0589bc743e458b16bd1d33d73835
properly compute fp/mode for scalar ops for vectorizer costing

The x86 add_stmt_hook relies on the passed vectype to determine
the mode and whether it is FP for a scalar operation.  This is
unreliable now for stmts involving patterns and in the future when
there is no vector type passed for scalar operations.

To be least disruptive I've kept using the vector type if it is passed.

* config/i386/i386.cc (ix86_vector_costs::add_stmt_cost): Use
the LHS of a scalar stmt to determine mode and whether it is FP.
gcc/config/i386/i386.cc