Shl/Shr/Sar(0,x) ==> 0
Don't. Because doing so removes the undefined behaviour in case the shift
amount is out of range. This is also consistent with what constant folding
does in this case, namely, passing the undefined behaviour down the VEX
pipeline.
e2 = e->Iex.Binop.arg1;
break;
}
- /* Shl8/Shl16/Shl32/Shl64(0,x) ==> 0
- Shr8/Shr16/Shr32/Shr64(0,x) ==> 0
- Sar8/Sar16/Sar32/Sar64(0,x) ==> 0 */
- if (isZeroU(e->Iex.Binop.arg1)) {
- e2 = e->Iex.Binop.arg1;
- break;
- }
break;
case Iop_Or1: