On Mon, Jul 20, 2009 at 05:37:29PM -0400, Lingchuan (LC) Meng wrote: > Hi all, > > I'm trying to enable gcc 4.3.2 on Ubuntu to compile C code with > support of conditional moves. (and Conditional Moves as the only > enabled optimization) > > I can see CMOVxx in the assembly compiled with "-O" option. However, > no CMOVxx is found in the assembly generated with just > "-fif-conversion" option. > > More surprisingly (well, at least to me), I listed all the enabled > optimization options of "-O", and put them in one line. Then I > compiled the same code as: Several optimizations require a certain optimization level, and are not done even if you specify the -f option. If conversion is one such optimization, where the functions gate_handle_if_conversion and gate_handle_if_conversion_after_combine, and gate_handle_if_conversion_after_reload in ifcvt.c all have explicit tests for optimize being greater than 0 in addition to the -f option flag(s). I would suspect this is because if conversion needs some of the dataflow passes that are not normally run for -O0. From the ChangeLogs, it looks like the functions were originally added in July 2005. -- Michael Meissner, IBM 4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA meissner@xxxxxxxxxxxxxxxxxx