aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sparsei
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-02 00:20:25 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-23 13:11:20 +0200
commit212b9239abbc4101b9558d2a5c8a554eaae99b00 (patch)
tree52c2c59906b401f3688a4e580376328e65eb7fc2 /sparsei
parent548f00d19561881ba176c8acfaf9121ddacb80e8 (diff)
downloadsparse-dev-212b9239abbc4101b9558d2a5c8a554eaae99b00.tar.gz
cast: simplify [SZ]EXT + TRUNC to a smaller/greater size
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>
Diffstat (limited to 'sparsei')
0 files changed, 0 insertions, 0 deletions