]> git.ipfire.org Git - thirdparty/gcc.git/commit
Make some smallest_int_mode_for_size calls cope with failure
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 29 Aug 2024 13:00:23 +0000 (14:00 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 29 Aug 2024 13:00:23 +0000 (14:00 +0100)
commit00ec6bd805924b2d7d72cf03b200b3b4b7831835
tree8fe66507e6a41b5d453acfb0856f62e746daf45b
parent07e5e054a1c579dec3e1ed2192992b2fea14ad40
Make some smallest_int_mode_for_size calls cope with failure

smallest_int_mode_for_size now returns an optional mode rather
than aborting on failure.  This patch adjusts a couple of callers
so that they fail gracefully when no mode exists.

There should be no behavioural change, since anything that triggers
the new return paths would previously have aborted.  I just think
this is how the code would have been written if the option had been
available earlier.

gcc/
* dse.cc (find_shift_sequence): Allow smallest_int_mode_for_size
to failure.
* optabs.cc (expand_twoval_binop_libfunc): Likewise.
gcc/dse.cc
gcc/optabs.cc