> Also, compilers don't reason about code the same way humans do.
Not these compilers for sure. But I don't agree that all compilers are broken.
> They apply a large number of small transformations, each of these transformations is very reasonable and it is their combination that results in "absurd" optimization results.
Humans use techniques like natural deduction to apply a series of transformations that do not lead to absurd results.