Re: [PATCH] Improve fold-const comparison checks (PR c++/67376)

2015-12-22 Thread Richard Biener
On December 22, 2015 4:24:40 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As the testcase shows, we have some regressions in constexpr folding in >GCC >5+. >One issue is that fold_binary_loc attempts to swap operands of >comparison >operators only if one of them is constant, most of the optimizatio

[PATCH] Improve fold-const comparison checks (PR c++/67376)

2015-12-22 Thread Jakub Jelinek
Hi! As the testcase shows, we have some regressions in constexpr folding in GCC 5+. One issue is that fold_binary_loc attempts to swap operands of comparison operators only if one of them is constant, most of the optimizations in there are written for constant in arg1 and therefore ok, but the two