]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-reassoc.cc: PR tree-optimization/116139 Don't assert when forming fully-pipeline...
authorKyrylo Tkachov <ktkachov@nvidia.com>
Fri, 2 Aug 2024 13:21:16 +0000 (06:21 -0700)
committerKyrylo Tkachov <ktkachov@nvidia.com>
Mon, 5 Aug 2024 11:07:47 +0000 (16:37 +0530)
commit44da85f4455ea11296667434172810ea76a62add
treef6ce6bc8350cb7e5114c48074b8756e0880e219c
parent8e2c9360c2df4b16582d3b9eb34e8c448798a1f3
tree-reassoc.cc: PR tree-optimization/116139 Don't assert when forming fully-pipelined FMAs on wide MULT targets

The code in get_reassociation_width that forms FMAs aggressively when
they are fully pipelined expects the FMUL reassociation width in the
target to be less than for FMAs. This doesn't hold for all target
tunings.

This code shouldn't ICE, just avoid forming these FMAs here.
This patch does that.

Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
PR tree-optimization/116139

gcc/ChangeLog:

* tree-ssa-reassoc.cc (get_reassociation_width): Move width_mult
<= width comparison to if condition rather than assert.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pr116139.c: New test.
gcc/testsuite/gcc.target/aarch64/pr116139.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.cc