On Fri, Aug 30, 2013 at 9:51 AM, Zhenqiang Chen <zhenqiang.c...@arm.com> wrote: > 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.
Btw, this is exactly why it's backward to do it this way. We finally succeeded in dropping TRUTH_AND/OR/..._EXPR in favor of lowering them to BIT_AND/OR/..._EXPR so passes need only handle _one_ variant. Now you introduce another that all passes need to handle. As far as I can see you only need those "combined" expressions at RTL expansion time. Richard. > 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.