In practice gcc's -O0 option doesn't mean "no optimisation at all" but "don't do things that would make debugging too hard and don't slow the compilation down". In particular at least half of fold-const.c is enabled regardless of optimisation setting, including "x|0 => x". I think the rationale here is that it can actually speed the compile up by giving the later stages less work to do. (It also wouldn't surprise me if some backends assumed it had been run.)
(no subject)
Date: 2007-03-16 10:09 pm (UTC)