aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-02-18 12:40:49 +0100
committerJakub Jelinek <jakub@redhat.com>2023-02-18 12:40:49 +0100
commit32b5875c911f80d551d006d7473e6f1f8705857a (patch)
treed2ce649cc66008304d69bed821205fc4f48661ab /gcc/rust/backend
parent3c135697fd5f79db0954a79a48dcbba657e93f2e (diff)
downloadgcc-32b5875c911f80d551d006d7473e6f1f8705857a.zip
gcc-32b5875c911f80d551d006d7473e6f1f8705857a.tar.gz
gcc-32b5875c911f80d551d006d7473e6f1f8705857a.tar.bz2
reassoc: Fold some statements [PR108819]
This spot in update_ops can replace one or both of the assign operands with constants, creating 1 & 1 and similar expressions which can confuse later passes until they are folded. Rather than folding both constants by hand and also handling swapping of operands for commutative ops if the first one is constant and second one is not, the following patch just uses fold_stmt_inplace to do that. I think we shouldn't fold more than the single statement because that could screw up the rest of the pass, we'd have to mark all those with uids, visited and the like. 2023-02-18 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/108819 * tree-ssa-reassoc.cc (update_ops): Fold new stmt in place. * gcc.dg/pr108819.c: New test.
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions