Gregory Stark <stark@enterprisedb.com> writes:
> If it does constant propagation without handling overflow it could end up
> with:
> (olddatum >> 2 << 2) & 0x3FFFFFFFC
> note that in fact truncating the high two bits as the assembler did would in
> fact be the correct thing to do here which would explain why it doesn't cause
> any actual problems.
Good point, but I also note that the places Heikki saw were inside
loops. I think it might be some combination of the above and a loop
strength reduction optimization.
regards, tom lane