Commit 109cca3b by Alexander Monakov

gimple-ssa-store-merging.c: fix sort_by_bitpos

	* gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.

From-SVN: r250394
parent 584bafb6
2017-07-18 Jan Hubicka <hubicka@ucw.cz> 2017-07-20 Alexander Monakov <amonakov@ispras.ru>
* gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
2017-07-20 Jan Hubicka <hubicka@ucw.cz>
* bb-reorder.c (connect_traces): Allow copying of blocks within * bb-reorder.c (connect_traces): Allow copying of blocks within
single partition. single partition.
......
...@@ -516,12 +516,12 @@ sort_by_bitpos (const void *x, const void *y) ...@@ -516,12 +516,12 @@ sort_by_bitpos (const void *x, const void *y)
store_immediate_info *const *tmp = (store_immediate_info * const *) x; store_immediate_info *const *tmp = (store_immediate_info * const *) x;
store_immediate_info *const *tmp2 = (store_immediate_info * const *) y; store_immediate_info *const *tmp2 = (store_immediate_info * const *) y;
if ((*tmp)->bitpos <= (*tmp2)->bitpos) if ((*tmp)->bitpos < (*tmp2)->bitpos)
return -1; return -1;
else if ((*tmp)->bitpos > (*tmp2)->bitpos) else if ((*tmp)->bitpos > (*tmp2)->bitpos)
return 1; return 1;
else
gcc_unreachable (); return 0;
} }
/* Sorting function for store_immediate_info objects. /* Sorting function for store_immediate_info objects.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment