aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/zext-asr.c
AgeCommit message (Collapse)AuthorFilesLines
2018-07-25shift: simplify ASR(ZEXT(X, N), C)Luc Van Oostenryck1-0/+13
After an OP_ZEXT, it is guaranteed that the sign bit is zero. So, an arithmetic right-shift following an OP_ZEXT gives the same result as an logical right-shift which is simpler to handle and further optimize. So, when preceded by an OP_ZEXT, replace OP_ASR by OP_LSR. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>