Commit 0f3f9437 by Richard Biener Committed by Richard Biener

re PR tree-optimization/71423 (wrong code at -Os and above on x86_64-linux-gnu)

2016-06-07  Richard Biener  <rguenther@suse.de>

	PR middle-end/71423
	* match.pd ((X | ~Y) -> Y <= X): Properly invert the comparison
	for signed ops.

	* gcc.dg/torture/pr71423.c: New testcase.

From-SVN: r237166
parent df32c0b3
2016-06-07 Richard Biener <rguenther@suse.de>
PR middle-end/71423
* match.pd ((X | ~Y) -> Y <= X): Properly invert the comparison
for signed ops.
2016-06-06 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.md (call): Generate indirect long calls to non-local
......
......@@ -900,12 +900,16 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(ne (bit_and:c (bit_not @0) @1) integer_zerop)
(if (INTEGRAL_TYPE_P (TREE_TYPE (@1))
&& TYPE_PRECISION (TREE_TYPE (@1)) == 1)
(lt @0 @1)))
(if (TYPE_UNSIGNED (TREE_TYPE (@1)))
(lt @0 @1)
(gt @0 @1))))
(simplify
(ne (bit_ior:c (bit_not @0) @1) integer_zerop)
(if (INTEGRAL_TYPE_P (TREE_TYPE (@1))
&& TYPE_PRECISION (TREE_TYPE (@1)) == 1)
(le @0 @1)))
(if (TYPE_UNSIGNED (TREE_TYPE (@1)))
(le @0 @1)
(ge @0 @1))))
/* ~~x -> x */
(simplify
......
2016-06-07 Richard Biener <rguenther@suse.de>
PR middle-end/71423
* gcc.dg/torture/pr71423.c: New testcase.
2016-06-07 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/71408
......
/* { dg-do run } */
struct S1
{
int f1:1;
};
volatile struct S1 b = { 0 };
int
main ()
{
char c = b.f1;
b.f1 = 1;
if (b.f1 > -1 || c)
__builtin_abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment