diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-08-15 11:24:01 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 07:46:40 +0200 |
| commit | 01951278a60490735677920c86f139d627b22dbf (patch) | |
| tree | 44e9168eacaf2053a4b96bc52a4fb38b288e07a2 /validation/optim/kill-casts.c | |
| parent | bf21036518acf0c3069c9c9e12b13fd09c8cdceb (diff) | |
| download | sparse-dev-01951278a60490735677920c86f139d627b22dbf.tar.gz | |
cast: specialize integer casts
Casts to integer used to be done with only 2 instructions:
OP_CAST & OP_SCAST.
Those are not very convenient as they don't reflect the real
operations that need to be done.
This patch specialize these instructions in:
- OP_TRUNC, for casts to a smaller type
- OP_ZEXT, for casts that need a zero extension
- OP_SEXT, for casts that need a sign extension
- Integer-to-integer casts of the same size are considered as
a NOPs and are, in fact, never emitted.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim/kill-casts.c')
| -rw-r--r-- | validation/optim/kill-casts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/validation/optim/kill-casts.c b/validation/optim/kill-casts.c index 140b8d20..2aa53fda 100644 --- a/validation/optim/kill-casts.c +++ b/validation/optim/kill-casts.c @@ -22,4 +22,6 @@ void foo(struct s *x) * check-output-excludes: fcvt[us]\\. * check-output-excludes: utptr\\. * check-output-excludes: ptrtu\\. + * check-output-excludes: [sz]ext\\. + * check-output-excludes: trunc\\. */ |
