diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-08-14 15:14:58 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-06-23 07:46:40 +0200 |
| commit | 55cac5336b14524ebc371bcee006e2b497d84c5f (patch) | |
| tree | 64d7e01851d72fc63951ffe2d98d9c4057882150 /validation/linear | |
| parent | c6d4716f71de8de9683464b677207304583dc2a0 (diff) | |
| download | sparse-dev-55cac5336b14524ebc371bcee006e2b497d84c5f.tar.gz | |
cast: handle NO-OP casts
Some casts, the ones which doesn't change the size or the resulting
'machine type', are no-op.
Directly simplify away such casts.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/linear')
| -rw-r--r-- | validation/linear/cast-kinds.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/linear/cast-kinds.c b/validation/linear/cast-kinds.c index d8ac5d34..5944610c 100644 --- a/validation/linear/cast-kinds.c +++ b/validation/linear/cast-kinds.c @@ -50,6 +50,9 @@ static double long_2_double(long a) { return (double)a; } static double ulong_2_double(ulong a) { return (double)a; } static double float_2_double(float a) { return (double)a; } +static float float_2_float(float a) { return a; } +static double double_2_double(double a) { return a; } + /* * check-name: cast-kinds * check-command: test-linearize -m64 $file @@ -387,5 +390,17 @@ float_2_double: ret.64 %r143 +float_2_float: +.L96: + <entry-point> + ret.32 %arg1 + + +double_2_double: +.L98: + <entry-point> + ret.64 %arg1 + + * check-output-end */ |
