Hi,

The patch updates vrp pass to handle conditional compare (CCMP).

CCMP is a combine of BIT_AND_EXPR/BIT_IOR_EXPR and CMP expression. The codes
are similar with those to handle BIT_AND_EXPR/BIT_IOR_EXPR and CMP
expression.

When the compare in CCMP can be simplified, CCMP will be converted to a
copy,
compare or a bit operator.

Bootstrap on x86-64 and ARM Chromebook.
No ICE and runtime errors in regression tests.
All "vrp" related test cases PASS.

Thanks!
-Zhenqiang

ChangeLog:
2013-08-30  Zhenqiang Chen  <zhenqiang.c...@linaro.org>

        * tree-vrp.c (extract_range_from_assignment,
register_edge_assert_for,
        simplify_stmt_using_ranges): Handle conditional compare.
        (extract_range_from_comparison, can_simplify_ops_using_ranges_p,
        simplify_ccmp_to_cmp, simple_ccmp_second_compare,
simplify_ccmp_to_op,
        simplify_ccmp_stmt_using_ranges): New added.

testsuite/ChangeLog:
2013-08-30  Zhenqiang Chen  <zhenqiang.c...@linaro.org>

        * gcc.dg/tree-ssa/ccmp*.c: New test cases.

Attachment: vrp-CCMP.patch
Description: Binary data

Reply via email to