Re: [PATCH] Use fold_build2 instead fold_binary for TRUTH_AND

2021-10-19 Thread guojiufu via Gcc-patches
On 2021-10-20 10:44, Andrew Pinski wrote: On Tue, Oct 19, 2021 at 7:30 PM Jiufu Guo via Gcc-patches wrote: In tree_simplify_using_condition_1, there is code which should be logic: "op0 || op1"/"op0 && op1". When creating expression for TRUTH_OR_EXPR and TRUTH_AND_EXPR, fold_build2 would be

Re: [PATCH] Use fold_build2 instead fold_binary for TRUTH_AND

2021-10-19 Thread Andrew Pinski via Gcc-patches
On Tue, Oct 19, 2021 at 7:30 PM Jiufu Guo via Gcc-patches wrote: > > In tree_simplify_using_condition_1, there is code which should be logic: > "op0 || op1"/"op0 && op1". When creating expression for TRUTH_OR_EXPR > and TRUTH_AND_EXPR, fold_build2 would be used instead fold_binary which > always

[PATCH] Use fold_build2 instead fold_binary for TRUTH_AND

2021-10-19 Thread Jiufu Guo via Gcc-patches
In tree_simplify_using_condition_1, there is code which should be logic: "op0 || op1"/"op0 && op1". When creating expression for TRUTH_OR_EXPR and TRUTH_AND_EXPR, fold_build2 would be used instead fold_binary which always return NULL_TREE for this kind of expr. Bootstrap and regtest pass on ppc a