On Mon, Aug 8, 2016 at 3:41 AM, kugan <kugan.vivekanandara...@linaro.org> wrote: > Hi All, > > I was experimenting with using ccp mask and value to refine value_ranges for > SSA_NAME. Attached patch does this. This might be particularly useful for > early_vrp. Bootstrap on x86_64-linux-gnu is OK. However, there are some > test-cases (as shown below) are failing. > > > Is this worth investigating? Any thoughts? > > # Comparing directories > ## Dir1=build-base/: 11 sum files > ## Dir2=build: 11 sum files > > # Comparing 11 common sum files > ## /bin/sh ./gcc/contrib/compare_tests /tmp/gxx-sum1.26167 > /tmp/gxx-sum2.26167 > Tests that now fail, but worked before: > > gcc.c-torture/execute/pr57124.c -O2 execution test > gcc.c-torture/execute/pr57124.c -O2 -flto -fno-use-linker-plugin > -flto-partition=none execution test > gcc.c-torture/execute/pr57124.c -O3 -g execution test > gcc.c-torture/execute/pr57124.c -Os execution test > gcc.dg/Wstrict-overflow-12.c correct warning (test for warnings, line 13) > gcc.dg/Wstrict-overflow-13.c correct warning (test for warnings, line 14) > gcc.dg/Wstrict-overflow-21.c correct warning (test for warnings, line 8) > gcc.dg/no-strict-overflow-6.c scan-tree-dump optimized "return 0" > gcc.dg/tree-ssa/pr61743-1.c scan-tree-dump-times cunroll "loop with 4 > iterations completely unrolled" 2 > gcc.dg/tree-ssa/pr61743-1.c scan-tree-dump-times cunroll "loop with 8 > iterations completely unrolled" 2 > gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread3 "Jumps threaded: > 3"
Esp. the execute fail need to be investigated of course. I'd have done it similar to set_range_info improving nonzero_bits, thus, have set_nonzero_bits improve range_info rather than introducing a new refine_range_info or if that doesn't do anything useful without also knowing the known-ones then inline this all into the single caller in CCP or provide an optional arg to set_nonzero_bits with the missing information. Richard. > ## Differences found: > # 1 differences in 11 common sum files found > > > Thanks, > Kugan > > > gcc/ChangeLog: > > 2016-08-08 Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> > > * tree-ssanames.c (refine_range_info): New. > * tree-ssa-ccp.c (ccp_finalize): Call refine_range_info. > * tree-ssanames.c (refine_range_info): Declare. >