aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/eval/not-cast-bool.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-19remove early simplification of casts during evaluationLuc Van Oostenryck1-1/+0
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>
2021-04-18add testcases for simplification of casts.Luc Van Oostenryck1-0/+15
and remove one that didn't made much sense. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>