Commit cf9322ca by Eric Botcazou Committed by Eric Botcazou

tree-ssa-loop-ivopts.c (may_be_nonaddressable_p): Return true for non-addressable GIMPLE operands.

	* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>:
	Return true for non-addressable GIMPLE operands.

From-SVN: r140941
parent d208e2d2
2008-10-07 Eric Botcazou <ebotcazou@adacore.com>
* tree-ssa-loop-ivopts.c (may_be_nonaddressable_p) <VIEW_CONVERT_EXPR>:
Return true for non-addressable GIMPLE operands.
2008-10-07 H.J. Lu <hongjiu.lu@intel.com>
PR target/24765
......
2008-10-07 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization4.adb: New test.
* gnat.dg/loop_optimization4_pkg.ad[sb]: New helper.
2008-10-07 Bob Wilson <bob.wilson@acm.org>
* gcc.dg/compat/struct-layout-1_generate.c (dg_options): New. Moved
......
-- { dg-do run }
-- { dg-options "-O2" }
with Loop_Optimization4_Pkg; use Loop_Optimization4_Pkg;
procedure Loop_Optimization4 is
begin
Add ("Nothing");
end;
package body Loop_Optimization4_Pkg is
procedure Add (Phrase : String) is
begin
if Debug_Buffer_Len = Max_Debug_Buffer_Len then
return;
end if;
for I in Phrase'Range loop
Debug_Buffer_Len := Debug_Buffer_Len + 1;
Debug_Buffer (Debug_Buffer_Len) := Phrase (I);
if Debug_Buffer_Len = Max_Debug_Buffer_Len then
exit;
end if;
end loop;
end Add;
end Loop_Optimization4_Pkg;
package Loop_Optimization4_Pkg is
Max_Debug_Buffer_Len : Natural := 8 * 1024;
Debug_Buffer : String (1 .. Max_Debug_Buffer_Len);
Debug_Buffer_Len : Natural range 0 .. Max_Debug_Buffer_Len;
procedure Add (Phrase : String);
end Loop_Optimization4_Pkg;
......@@ -1558,7 +1558,7 @@ may_be_nonaddressable_p (tree expr)
non-addressability may be uncovered again, causing ADDR_EXPRs
of inappropriate objects to be built. */
if (is_gimple_reg (TREE_OPERAND (expr, 0))
|| is_gimple_min_invariant (TREE_OPERAND (expr, 0)))
|| !is_gimple_addressable (TREE_OPERAND (expr, 0)))
return true;
/* ... fall through ... */
......
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