]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/params.def
Teach VRP to register assertions along default switch labels (PR18046)
authorppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Jul 2016 15:19:58 +0000 (15:19 +0000)
committerppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 26 Jul 2016 15:19:58 +0000 (15:19 +0000)
commit7e1856f107f1762c83b8e8abbd5afcd3eafcaa5c
treea53f8a1a5848309a51cb3d1a26203dfdbb2631c6
parent08679462be44d0047cf424a09fbff74362d45b28
Teach VRP to register assertions along default switch labels (PR18046)

gcc/ChangeLog:

PR tree-optimization/18046
* genmodes.c (emit_mode_size_inline): Emit an assert that
verifies that mode is a valid array index.
(emit_mode_nuinits_inline): Likewise.
(emit_mode_inner_inline): Likewise.
(emit_mode_unit_size_inline): Likewise.
(emit_mode_unit_precision_inline): Likewise.
* tree-vrp.c: Include params.h.
(find_switch_asserts): Register edge assertions for the default
label which correspond to the anti-ranges of each case label.
* params.def (PARAM_MAX_VRP_SWITCH_ASSERTIONS): New.
* doc/invoke.texi: Document it.

gcc/testsuite/ChangeLog:

PR tree-optimization/18046
* gcc.dg/tree-ssa/ssa-dom-thread-6.c: Bump FSM count to 5.
* gcc.dg/tree-ssa/vrp103.c: New test.
* gcc.dg/tree-ssa/vrp104.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238761 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/doc/invoke.texi
gcc/genmodes.c
gcc/params.def
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c
gcc/testsuite/gcc.dg/tree-ssa/vrp103.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/vrp104.c [new file with mode: 0644]
gcc/tree-vrp.c