> Date: Wed, 23 Aug 2023 11:10:02 +0200 > From: Jan Hubicka via Gcc-patches <gcc-patches@gcc.gnu.org>
> Hi, > this patch adds missing profile update to maybe_optimize_range_tests. [...] > Jakub, it seems that the code is originally yours. Any idea why those are > not turned to > constant true or false conditionals? > > Bootstrapped/regtested x86_64-linux, does it seem to make sense? > > gcc/ChangeLog: > > PR tree-optimization/110628 > * tree-ssa-reassoc.cc (maybe_optimize_range_tests): Add profile update. Hi. Feeling somewhat guilty for not noticing that you had posted a patch before me xfailing it, I went ahead and tested this patch for cris-elf against r14-3431-g7e05cd632fab, but unfortunately it regresses a few tests, and it appears it's not just testcase (dumps) that need tweaking. Four test-cases regress (counting multiple runs as just one): Running /x/gcc/gcc/testsuite/gcc.c-torture/execute/execute.exp ... FAIL: gcc.c-torture/execute/pr95731.c -O1 execution test FAIL: gcc.c-torture/execute/pr95731.c -O2 execution test FAIL: gcc.c-torture/execute/pr95731.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test FAIL: gcc.c-torture/execute/pr95731.c -O3 -g execution test FAIL: gcc.c-torture/execute/pr95731.c -Os execution test FAIL: gcc.c-torture/execute/pr95731.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test FAIL: gcc.c-torture/execute/pr95731.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test ... Running /x/gcc/gcc/testsuite/gcc.dg/dg.exp ... FAIL: gcc.dg/pr46309-2.c scan-tree-dump-times reassoc2 "Optimizing range tests [^\r\n]*_[0-9]* -.0, 0. and -.128, 128.[\n\r]* into" 1 ... Running /x/gcc/gcc/testsuite/gcc.dg/torture/dg-torture.exp ... FAIL: gcc.dg/torture/pr63464.c -Os execution test ... Running /x/gcc/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp ... ... FAIL: gcc.dg/tree-ssa/pr95731.c scan-tree-dump-times optimized " >= 0| < 0" 6 brgds, H-P