diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-12-17 01:39:43 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-04-19 00:56:42 +0200 |
| commit | 94750498b1d3ef03fd78920b70e7330072dbb4ed (patch) | |
| tree | 3b31f4eac1903318fdc76bbd765a787167231313 /validation/optim | |
| parent | 98075702ca78ff79e568a6b8004ee5fad7b0bfbe (diff) | |
| download | sparse-dev-94750498b1d3ef03fd78920b70e7330072dbb4ed.tar.gz | |
remove early simplification of casts during evaluation
The current code will simplify away some casts at evaluation time
but doesn't take in account some special cases:
* (bool)~<int> is not equivalent to ~(bool)<int> (anything not all 0 or 1)
* (float)~<int> is not equivalent to ~(float)<int> which doesn't make sense.
* (int)(float)<int> is not a no-op if the (float) overflows
This kind of simplification is better done on the IR where the different
kind of casts correspond to distinct instructions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/optim')
0 files changed, 0 insertions, 0 deletions
