Re: [PATCH] PHIOPT: Mark the conditional lhs and rhs as to look at to see if DCEable

2023-08-02 Thread Richard Biener via Gcc-patches
On Mon, Jul 31, 2023 at 10:17 PM Andrew Pinski via Gcc-patches wrote: > > In some cases (usually dealing with bools only), there could be some > statements > left behind which are considered trivial dead. > An example is: > ``` > bool f(bool a, bool b) > { > if (!a && !b) > return 0;

[PATCH] PHIOPT: Mark the conditional lhs and rhs as to look at to see if DCEable

2023-07-31 Thread Andrew Pinski via Gcc-patches
In some cases (usually dealing with bools only), there could be some statements left behind which are considered trivial dead. An example is: ``` bool f(bool a, bool b) { if (!a && !b) return 0; if (!a && b) return 0; if (a && !b) return 0; return 1; } ``` Wh