aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/ext-trunc-smaller.c
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 /validation/optim/ext-trunc-smaller.c
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 'validation/optim/ext-trunc-smaller.c')
-rw-r--r--validation/optim/ext-trunc-smaller.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/ext-trunc-smaller.c b/validation/optim/ext-trunc-smaller.c
index a757a3ad..194c98d7 100644
--- a/validation/optim/ext-trunc-smaller.c
+++ b/validation/optim/ext-trunc-smaller.c
@@ -11,7 +11,6 @@ char ult(unsigned short x)
/*
* check-name: ext-trunc-smaller
* check-command: test-linearize -Wno-decl $file
- * check-known-to-fail
*
* check-output-ignore
* check-output-excludes: sext\\.