aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/shift-shift.c
AgeCommit message (Collapse)AuthorFilesLines
2018-07-25shift: simplify LSR(LSR(x,N),N') & friendsLuc Van Oostenryck1-0/+149
A shift of a shift (of the same kind) is equivalent to a single shitf with a count equal to the sum of the two initial counts. In addition: * for LSRs & SHLs, if the sum is >= to the instruction size, then the result is zero. * for ASRs, if the sum is >= to the instruction size, then the result is the same as a shift of a count of size - 1. Implement these simplifications if both shift counts are in range. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>