mbox series

[0/3] remove early simplification of casts during evaluation

Message ID 20210418115635.40608-1-luc.vanoostenryck@gmail.com (mailing list archive)
Headers show
Series remove early simplification of casts during evaluation | expand

Message

Luc Van Oostenryck April 18, 2021, 11:56 a.m. UTC
This series removes an early simplification of casts during evaluation
which was wrong in some contexts (for example when applied to a bool)
but adds the equivalent optimization back at simplification where it can
be safely done at IR level.


Luc Van Oostenryck (3):
  add testcases for simplification of casts.
  simplify TRUNC(NOT(x)) --> NOT(TRUNC(x))
  remove early simplification of casts during evaluation

 evaluate.c                       | 44 +-------------------------------
 simplify.c                       | 15 +++++++++++
 validation/eval/not-cast-bool.c  | 14 ++++++++++
 validation/eval/not-cast-float.c | 14 ++++++++++
 validation/optim/and-extendx.c   | 24 -----------------
 validation/optim/trunc-not0.c    | 20 +++++++++++++++
 6 files changed, 64 insertions(+), 67 deletions(-)
 create mode 100644 validation/eval/not-cast-bool.c
 create mode 100644 validation/eval/not-cast-float.c
 delete mode 100644 validation/optim/and-extendx.c
 create mode 100644 validation/optim/trunc-not0.c


base-commit: eb4cdd21b7d0cedbbeff7f70e24473706ccce5a6