Commit e76340be by Eric Botcazou Committed by Eric Botcazou

tree-vrp.c (get_single_symbol): New function.

	* tree-vrp.c (get_single_symbol): New function.
	(build_symbolic_expr): Likewise.
	(symbolic_range_based_on_p): New predicate.
	(extract_range_from_binary_expr_1): Deal with single-symbolic ranges
	for PLUS and MINUS.  Do not drop symbolic ranges at the end.
	(extract_range_from_binary_expr): Try harder for PLUS and MINUS if
	operand is symbolic and based on the other operand.

From-SVN: r215697
parent ff5fdf67
2014-09-29 Eric Botcazou <ebotcazou@adacore.com>
* tree-vrp.c (get_single_symbol): New function.
(build_symbolic_expr): Likewise.
(symbolic_range_based_on_p): New predicate.
(extract_range_from_binary_expr_1): Deal with single-symbolic ranges
for PLUS and MINUS. Do not drop symbolic ranges at the end.
(extract_range_from_binary_expr): Try harder for PLUS and MINUS if
operand is symbolic and based on the other operand.
2014-09-29 Chen Gang <gang.chen.5i5j@gmail.com>
* config/microblaze/microblaze.md (call_internal1): Use VOID
2014-09-29 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/tree-ssa/vrp94.c: New test.
* gnat.dg/opt40.adb: Likewise.
2014-09-29 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
* gcc.dg/vmx/ops.c: Remove calls to vec_splat, vec_vsplth,
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
extern void abort (void);
int
foo1 (int x, int y)
{
int z;
if (x >= y)
return 1;
z = y - x;
if (z <= 0)
abort ();
return z;
}
unsigned int
foo2 (unsigned int x, unsigned int y)
{
unsigned int z;
if (x >= y)
return 1;
z = y - x;
if (z == 0)
abort ();
return z;
}
/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
-- { dg-do compile }
-- { dg-options "-O2 -fdump-tree-optimized" }
pragma Suppress (Overflow_Check);
function Opt40 (X : Integer; Y : Integer) return Positive is
Z : Integer;
begin
if X >= Y then
return 1;
end if;
Z := Y - X;
return Z;
end;
-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }
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