]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/80342 - genmatch optimize outer conversions
authorRichard Biener <rguenther@suse.de>
Tue, 21 Jan 2025 12:50:26 +0000 (13:50 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 28 Apr 2025 10:40:57 +0000 (12:40 +0200)
commit99aa410f5e0a722822698e765ca165e73ca4f637
treef8d8e94c64bde4b3ba4f76397f7c6888963c2ad7
parente543eaa671d40868575385360d13ef37d87fb2a0
middle-end/80342 - genmatch optimize outer conversions

The following improves genmatch generated code so we avoid more
spurious SSA assignments to be pushed to the GIMPLE sequence or
simplifications rejected when we're not supposed to produce any
for outer and intermediate conversions.

* genmatch.cc (::gen_transform): Add in_place parameter.
Assert it isn't set in unexpected places.
(possible_noop_convert): New.
(expr::gen_transform): Support in_place and emit code to
compute a child in-place when the operation is a conversion.
(dt_simplify::gen_1): Arrange for an outermost conversion
to be elided by generating the transform of the operand
in-place.
* match.pd (__real cepxi (x) -> cos (x)): Use single_use.
gcc/genmatch.cc
gcc/match.pd