------- Additional Comments From dberlin at gcc dot gnu dot org 2005-08-08
18:56 -------
(In reply to comment #1)
> Confirmed, for some reason the following is caught though:
If you thought about it, you'd notice that your example below has two
computations of a = b along the if branch, which is not optimal.
The original has one computation on each path which is already optimal.
> unsigned short f(unsigned short a)
> {
> unsigned short b = a <<1;
> if (a & 0x8000)
> a <<= 1, a = a ^ 0x1021;
> else
> a = b;
>
> return a;
> }
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23286