aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppdefault.c
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2017-09-13 13:49:50 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2017-09-13 13:49:50 +0000
commit0f0027d1635c52d0deae174bfc68022dc1217c8b (patch)
tree13d7fed1d513aede40a8fcde7e9259c7feb77bbf /gcc/cppdefault.c
parent7dbe3736d5fd19de6bb1768e9ca0a610b5e8ee3b (diff)
downloadgcc-0f0027d1635c52d0deae174bfc68022dc1217c8b.zip
gcc-0f0027d1635c52d0deae174bfc68022dc1217c8b.tar.gz
gcc-0f0027d1635c52d0deae174bfc68022dc1217c8b.tar.bz2
[store-merging] Use store order as tie-breaker in sort_by_bitpos
As Alexander pointed out in the thread starting at [1] the sort_by_bitpos sorting function was behaving badly when we had multiple stores at the same position. He fixed that (thanks!) but we can do better by not returning zero when the bitpositions are equal but by falling back to comparing the order the stores appear in, which is guaranteed to be unique (barring other bugs elsewhere). This patch does that. Bootstrapped and tested on aarch64-none-linux-gnu. [1] https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00895.html * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order when bitposition is the same. From-SVN: r252084
Diffstat (limited to 'gcc/cppdefault.c')
0 files changed, 0 insertions, 0 deletions