https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116139
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kyrylo Tkachov <ktkac...@gcc.gnu.org>: https://gcc.gnu.org/g:44da85f4455ea11296667434172810ea76a62add commit r15-2720-g44da85f4455ea11296667434172810ea76a62add Author: Kyrylo Tkachov <ktkac...@nvidia.com> Date: Fri Aug 2 06:21:16 2024 -0700 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 <ktkac...@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.