aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/ext-trunc-greater.c
AgeCommit message (Collapse)AuthorFilesLines
2018-07-23cast: simplify [SZ]EXT + TRUNC to a smaller/greater sizeLuc Van Oostenryck1-1/+0
An OP_SEXT or a OP_ZEXT followed by a truncate to a size smaller than the original size is unneeded, the same result can be obtained by doing the truncate directly on the original value. Dualy, an OP_SEXT or a OP_ZEXT followed by a truncate to a size greater than the original size doesn't need the truncate, the same result can be obtained by doing the extend directly on the original value. Rearrange the inputs (src & orig_type) to bypass the unneeded operation. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
2018-07-23add testcases for casts & bitfield insertion/extractionLuc Van Oostenryck1-0/+18
There is several difficulties some related to unclear semantic of our IR instructions and/or type evaluation. Add testcases trying to cover this area. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>