diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-11-16 11:43:31 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-11-16 11:43:31 +0000 |
commit | f9d6338bd15ce1fae36bf25d3a0545e9678ddc58 (patch) | |
tree | df3f266e8905b2bb9efece9a71af140fced56abb /include/demangle.h | |
parent | b4d1b635737a4780e5be247f8be9550eaf83dae5 (diff) | |
download | gcc-f9d6338bd15ce1fae36bf25d3a0545e9678ddc58.zip gcc-f9d6338bd15ce1fae36bf25d3a0545e9678ddc58.tar.gz gcc-f9d6338bd15ce1fae36bf25d3a0545e9678ddc58.tar.bz2 |
Use a single comparison for index-based alias checks
This patch rewrites the index-based alias checks to use conditions
of the form:
(unsigned T) (a - b + bias) <= limit
E.g. before the patch:
struct s { int x[100]; };
void
f1 (struct s *s1, int a, int b)
{
for (int i = 0; i < 32; ++i)
s1->x[i + a] += s1->x[i + b];
}
used:
add w3, w1, 3
cmp w3, w2
add w3, w2, 3
ccmp w1, w3, 0, ge
ble .L2
whereas after the patch it uses:
sub w3, w1, w2
add w3, w3, 3
cmp w3, 6
bls .L2
The patch also fixes the seg_len1 and seg_len2 negation for cases in
which seg_len is a "negative unsigned" value narrower than 64 bits,
like it is for 32-bit targets. Previously we'd end up with values
like 0xffffffff000000001 instead of 1.
2019-11-16 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* tree-data-ref.c (create_intersect_range_checks_index): Rewrite
the index tests to have the form (unsigned T) (B - A + bias) <= limit.
gcc/testsuite/
* gcc.dg/vect/vect-alias-check-18.c: New test.
* gcc.dg/vect/vect-alias-check-19.c: Likewise.
* gcc.dg/vect/vect-alias-check-20.c: Likewise.
From-SVN: r278354
Diffstat (limited to 'include/demangle.h')
0 files changed, 0 insertions, 0 deletions