aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-pass.h
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2023-10-15 15:18:42 -0700
committerAndrew Pinski <pinskia@gmail.com>2023-10-16 09:59:56 -0700
commit29a4453c7b8a86d242dab89b9e4d222749fd911e (patch)
treecd9af0d09b4ab05e184e8332b56bbd441db52319 /gcc/tree-pass.h
parent7550130c8620085c4efdde3575190588795f9b61 (diff)
downloadgcc-29a4453c7b8a86d242dab89b9e4d222749fd911e.zip
gcc-29a4453c7b8a86d242dab89b9e4d222749fd911e.tar.gz
gcc-29a4453c7b8a86d242dab89b9e4d222749fd911e.tar.bz2
[PR31531] MATCH: Improve ~a < ~b and ~a < CST, allow a nop cast inbetween ~ and a/b
Currently we able to simplify `~a CMP ~b` to `b CMP a` but we should allow a nop conversion in between the `~` and the `a` which can show up. A similarly thing should be done for `~a CMP CST`. I had originally submitted the `~a CMP CST` case as https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585088.html; I noticed we should do the same thing for the `~a CMP ~b` case and combined it with that one here. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/31531 gcc/ChangeLog: * match.pd (~X op ~Y): Allow for an optional nop convert. (~X op C): Likewise. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr31531-1.c: New test. * gcc.dg/tree-ssa/pr31531-2.c: New test.
Diffstat (limited to 'gcc/tree-pass.h')
0 files changed, 0 insertions, 0 deletions