diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-02 00:20:25 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-07-23 13:11:20 +0200 |
| commit | 212b9239abbc4101b9558d2a5c8a554eaae99b00 (patch) | |
| tree | 52c2c59906b401f3688a4e580376328e65eb7fc2 /validation/optim/ext-trunc-greater.c | |
| parent | 548f00d19561881ba176c8acfaf9121ddacb80e8 (diff) | |
| download | sparse-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-greater.c')
| -rw-r--r-- | validation/optim/ext-trunc-greater.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/optim/ext-trunc-greater.c b/validation/optim/ext-trunc-greater.c index bb19e17b..b682fc5d 100644 --- a/validation/optim/ext-trunc-greater.c +++ b/validation/optim/ext-trunc-greater.c @@ -11,7 +11,6 @@ short ugt(unsigned char x) /* * check-name: ext-trunc-greater * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-excludes: trunc\\. |
