This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC][PR68217] Improve value range for signed & sign-bit-CST




On 27/04/16 00:14, Richard Biener wrote:
On Fri, Apr 15, 2016 at 12:44 PM, kugan
<kugan.vivekanandarajah@linaro.org> wrote:
As pointed out by Richard, for signed & sign-bit-CST value range should be
[-INF, 0] range, not a [-INF, INF] range as happens now.

This patch fixes this. I bootstrapped and regression tested for
x86-64-linux-gnu with no new regression. Is this OK for statege-1.

I think you need to check vr0 for singleton-constant == sign_bit as well,
there is nothing that canonicalizes this during propagation.

Thanks for the review. Here is the updated patch. I will bootstrap again and commit if this is OK.

Thanks,
Kugan


Otherwise ok.

Thanks,
Richard.

Thanks,
Kugan


gcc/ChangeLog:

2016-04-14  Kugan Vivekanandarajah  <kuganv@linaro.org>

         PR middle-end/68217
         * tree-vrp.c (extract_range_from_binary_expr_1): In case of signed &
sign-bit-CST,
          generate [-INF, 0] instead of [-INF, INF].


gcc/testsuite/ChangeLog:

2016-04-14  Kugan Vivekanandarajah  <kuganv@linaro.org>

         PR middle-end/68217
         * gcc.dg/pr68217.c: New test.

Attachment: pr68217.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]