Re: [C++ PATCH] Optimize void COND_EXPRs during cp_fold (PR c++/81675)

2017-11-27 Thread Nathan Sidwell
On 11/24/2017 04:35 PM, Jakub Jelinek wrote: Hi! The comment says that trying to fold VOID_TYPE_P COND_EXPRs is not worth bothering, but as the following testcase shows, that is not the case. fold_ternary can optimize COND_EXPRs where the condition is constant and the unused branch doesn't have

[C++ PATCH] Optimize void COND_EXPRs during cp_fold (PR c++/81675)

2017-11-24 Thread Jakub Jelinek
Hi! The comment says that trying to fold VOID_TYPE_P COND_EXPRs is not worth bothering, but as the following testcase shows, that is not the case. fold_ternary can optimize COND_EXPRs where the condition is constant and the unused branch doesn't have any labels, and not folding it early means bogu