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]

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


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.

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]