> -Original Message-
> From: Richard Biener
> Sent: Monday, September 26, 2022 11:28 AM
> To: Tamar Christina
> Cc: gcc-patches@gcc.gnu.org; nd ; jeffreya...@gmail.com;
> ebotca...@adacore.com
> Subject: Re: [PATCH]middle-end fix floating out of constants in conditi
> Before my change we had always done the folding *only* for TREE_CONSTANT
> (arg) and my change allowed it for some cases of !TREE_CONSTANT (arg), but
> I did not want to touch the !TREE_CONSTANT (arg) case at all:
...to touch the TREE_CONSTANT (arg) case at all...
--
Eric Botcazou
> I think the better fix would be to only consider TREE_CONSTANT (arg)
> if it wasn't constant initially. Because clearly "simplify" intends
> to be "constant" here. In fact I wonder why we test !TREE_CONSTANT (arg)
> at all, we don't simplify 'arg' ...
>
> Eric added this test (previosuly we'd
On Fri, 23 Sep 2022, Tamar Christina wrote:
> Hi All,
>
> The following testcase:
>
> int zoo1 (int a, int b, int c, int d)
> {
>return (a > b ? c : d) & 1;
> }
>
> gets de-optimized by the front-end since somewhere around GCC 4.x due to a fix
> that was added to
On 9/23/22 03:21, Tamar Christina wrote:
Hi All,
The following testcase:
int zoo1 (int a, int b, int c, int d)
{
return (a > b ? c : d) & 1;
}
gets de-optimized by the front-end since somewhere around GCC 4.x due to a fix
that was added to fold_binary_op_with_conditional_arg.
The
Hi All,
The following testcase:
int zoo1 (int a, int b, int c, int d)
{
return (a > b ? c : d) & 1;
}
gets de-optimized by the front-end since somewhere around GCC 4.x due to a fix
that was added to fold_binary_op_with_conditional_arg.
The folding is supposed to succeed only if we have