aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-06-18 12:11:09 +0200
committerJakub Jelinek <jakub@redhat.com>2020-06-18 12:12:43 +0200
commit2e0f4a18bc978c73624dd016e4cce229c2809c9c (patch)
treeb707531c7df555f60f6fb700333cf9852ca54f77 /gcc/tree-vect-patterns.c
parent9a875db43cd4210843c480c8df26a1d6624d057d (diff)
downloadgcc-2e0f4a18bc978c73624dd016e4cce229c2809c9c.zip
gcc-2e0f4a18bc978c73624dd016e4cce229c2809c9c.tar.gz
gcc-2e0f4a18bc978c73624dd016e4cce229c2809c9c.tar.bz2
phiopt: Improve minmax optimization [PR95699]
As discussed in the PR, the x < 0x80000000U to (int) x >= 0 optimization stands in the way of minmax_replacement optimization, so for comparisons with most of the constants it works well, but when the above mentioned optimization triggers, it is unable to do it. The match.pd (cond (cmp (convert? x) c1) (op x c2) c3) -> (op (minmax x c1) c2) optimization is able to look through that and this patch teaches minmax_replacement about it too. 2020-06-18 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/95699 * tree-ssa-phiopt.c (minmax_replacement): Treat (signed int)x < 0 as x > INT_MAX and (signed int)x >= 0 as x <= INT_MAX. Move variable declarations to the statements that set them where possible. * gcc.dg/tree-ssa/pr95699.c: New test.
Diffstat (limited to 'gcc/tree-vect-patterns.c')
0 files changed, 0 insertions, 0 deletions