summaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorJeff Law <jlaw@localhost.localdomain>2021-09-01 19:13:58 -0400
committerJeff Law <jlaw@localhost.localdomain>2021-09-01 19:13:58 -0400
commit165446a1e81f5bb9597289e783af9ee67e1fe5ba (patch)
tree9385d8cb127de8afb24fc32a47dbe03cc125f2e9 /libphobos
parenta45786e9a31f995087d8cb42bc3a4fe06911e588 (diff)
Call reduce_vector_comparison_to_scalar_comparison earlier
As noted in the PR, we can get an ICE after the introduction of code to reduce a vector comparison to a scalar. The problem is we left the operand cache in an inconsistent state because we called the new function too late. This is trivially fixed by making the transformation before we call update_stmt_if_modified. The irony here is the whole point of calling reduce_vector_comparison_to_scalar_comparison when we did was to expose these kinds of secondary opportunities. In this particular case we collapsed the test to a comparison of constants (thus no SSA operands). Anyway, this fixes the problem in the obvious way. This may all end up being moot if I can twiddle Richi's match.pd pattern to work. It doesn't work as-written due to a couple issues that I haven't worked totally through yet. Installed on the trunk after bootstrap & regression testing on x86 and verifying it addresses the aarch64 issue. gcc/ PR tree-optimization/102152 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Reduce a vector comparison to a scalar comparison before calling update_stmt_if_modified. gcc/testsuite/ PR tree-optimization/102152 * gcc.dg/pr102152.c: New test
Diffstat (limited to 'libphobos')
0 files changed, 0 insertions, 0 deletions