Re: [PATCH] Fix reassoc var_bound range test optimization (PR tree-optimization/81588)

2017-08-01 Thread Richard Biener
On Mon, 31 Jul 2017, Jakub Jelinek wrote: > Hi! > > This patch fixes a couple of issues in optimize_range_tests_var_bound. > One is that if we have ranges[i].in_p, we should be inverting the comparison > rather than just swapping or not swapping operands. Then because > we want to handle only LT

[PATCH] Fix reassoc var_bound range test optimization (PR tree-optimization/81588)

2017-07-31 Thread Jakub Jelinek
Hi! This patch fixes a couple of issues in optimize_range_tests_var_bound. One is that if we have ranges[i].in_p, we should be inverting the comparison rather than just swapping or not swapping operands. Then because we want to handle only LT/LE, we want to swap operands and the comparison code i