On Tue, 18 Oct 2022, Andre Vieira (lists) wrote: > The ifcvt dead code elimination code was not built to deal with inline > assembly, as loops with such would never be if-converted in the past since > we can't do data-reference analysis on them and vectorization would eventually > fail. > For this reason we now also do not lower bitfields if the data-reference > analysis > fails, as we would not end up vectorizing it.  As a consequence this also > fixes > this PR as the dead code elimination will not run for such cases and > wrongfully > eliminate inline assembly statements. > > Bootstrapped and regression tested on aarch64-none-linux-gnu and > x86_64-pc-linux-gnu. OK. Thanks, Richard. > gcc/ChangeLog: > >     PR tree-optimization/107275 >     * tree-if-conv.cc (if_convertible_loop_p_1): Move >     find_data_references_in_loop call from here... >     (if_convertible_loop_p): And move data-reference vector initialization >     from here... >     (tree_if_conversion):... to here. > > gcc/testsuite/ChangeLog: > >     * gcc.dg/vect/pr107275.c: New test. > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)