[TREE-SSA-CCP] Issue warning when folding condition

Kugan Vivekanandarajah kugan.vivekanandarajah@linaro.org
Fri Aug 19 02:28:00 GMT 2016


On 19 August 2016 at 12:09, Kugan Vivekanandarajah
<kugan.vivekanandarajah@linaro.org> wrote:
> The testcase pr33738.C for warning fails with early-vrp patch. The
> reason is, with early-vrp ccp2 is folding the comparison that used to
> be folded in simplify_stmt_for_jump_threading. Since early-vrp does
> not perform jump-threading is not optimized there.
>
> Attached patch adds this warning to tree-ssa-ccp.c. We might also run
> into some other similar issues in the future.

Sorry, I attached the wrong patch (with typo). Here is the correct one.

Thanks,
Kugan

>
> Bootstrapped and regression tested on x86_64-linux-gnu with no new regressions.
>
> Is this OK for trunk?
>
> Thanks,
> Kugan
>
> gcc/ChangeLog:
>
> 2016-08-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
>
>     * tree-ssa-ccp.c (ccp_fold_stmt): If the comparison is being folded
>     and the operand on the LHS is being compared against a constant
>     value that is outside of type limit, issue warning.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Add-warn_type_limits-to-ccp.patch
Type: text/x-patch
Size: 2530 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160819/ef5f8a54/attachment.bin>


More information about the Gcc-patches mailing list