Re: [PATCH] Fix sort_by_operand_rank with qsort checking (PR tree-optimization/82381, #2)

2017-10-03 Thread Richard Biener
On October 3, 2017 1:55:35 PM GMT+02:00, Jakub Jelinek wrote: >On Tue, Oct 03, 2017 at 01:24:32PM +0300, Alexander Monakov wrote: >> On Tue, 3 Oct 2017, Jakub Jelinek wrote: >> > The qsort cmp transitivity checks may fail with the >sort_by_operand_rank >> > comparator, because if one of the operan

[PATCH] Fix sort_by_operand_rank with qsort checking (PR tree-optimization/82381, #2)

2017-10-03 Thread Jakub Jelinek
On Tue, Oct 03, 2017 at 01:24:32PM +0300, Alexander Monakov wrote: > On Tue, 3 Oct 2017, Jakub Jelinek wrote: > > The qsort cmp transitivity checks may fail with the sort_by_operand_rank > > comparator, because if one of the operands has stmt_to_insert and the > > other doesn't (but likely also if

Re: [PATCH] Fix sort_by_operand_rank with qsort checking (PR tree-optimization/82381)

2017-10-03 Thread Richard Biener
On October 3, 2017 12:00:21 PM GMT+02:00, Jakub Jelinek wrote: >Hi! > >The qsort cmp transitivity checks may fail with the >sort_by_operand_rank >comparator, because if one of the operands has stmt_to_insert and the >other doesn't (but likely also if one SSA_NAME is (D) and the other is >not), >w

Re: [PATCH] Fix sort_by_operand_rank with qsort checking (PR tree-optimization/82381)

2017-10-03 Thread Alexander Monakov
On Tue, 3 Oct 2017, Jakub Jelinek wrote: > The qsort cmp transitivity checks may fail with the sort_by_operand_rank > comparator, because if one of the operands has stmt_to_insert and the > other doesn't (but likely also if one SSA_NAME is (D) and the other is not), > we fallthrough into SSA_NAME_V

[PATCH] Fix sort_by_operand_rank with qsort checking (PR tree-optimization/82381)

2017-10-03 Thread Jakub Jelinek
Hi! The qsort cmp transitivity checks may fail with the sort_by_operand_rank comparator, because if one of the operands has stmt_to_insert and the other doesn't (but likely also if one SSA_NAME is (D) and the other is not), we fallthrough into SSA_NAME_VERSION comparison, but if both aren't (D) an