In the middle case the guard bit update is inside the loop, so it is not that easy to see if it can be eliminated.
I suppose the other two cases should be relatively easy to add to the backend optimizer.
LCC Bug: Guard bits should be updated before right shifts
Re: LCC Bug: Guard bits should be updated before right shift
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook