Commit 59a05b0c by Eric Botcazou Committed by Eric Botcazou

tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Tweak order of checks.

	* tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Tweak
	order of checks.

From-SVN: r153051
parent a4bf3794
2009-10-21 Eric Botcazou <ebotcazou@adacore.com>
* tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Tweak
order of checks.
2009-10-20 Richard Henderson <rth@redhat.com>
* tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1
2009-10-21 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization7.ad[sb]: New test.
* gnat.dg/loop_optimization7_pkg.ads: New helper.
2009-10-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/41706
......
-- { dg-do compile }
-- { dg-options "-O3" }
-- { dg-options "-O3 -msse" { target i?86-*-* x86_64-*-* } }
package body Loop_Optimization7 is
function Conv (A : Arr) return Arr is
Result : Arr;
begin
for I in A'Range loop
Result (I) := Conv (A (I));
end loop;
return Result;
end;
end Loop_Optimization7;
with Loop_Optimization7_Pkg; use Loop_Optimization7_Pkg;
package Loop_Optimization7 is
type Arr is array (1..8) of Rec;
function Conv (A : Arr) return Arr;
end Loop_Optimization7;
package Loop_Optimization7_Pkg is
pragma Pure;
type Rec is record
F : Float;
end record;
function Conv (Trig : Rec) return Rec;
end Loop_Optimization7_Pkg;
......@@ -172,13 +172,13 @@ exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
{
tree operand;
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
/* USE corresponds to some operand in STMT. If there is no data
reference in STMT, then any operand that corresponds to USE
is not indexing an array. */
if (!STMT_VINFO_DATA_REF (stmt_info))
return true;
/* STMT has a data_ref. FORNOW this means that its of one of
the following forms:
-1- ARRAY_REF = var
......@@ -191,14 +191,12 @@ exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
Therefore, all we need to check is if STMT falls into the
first case, and whether var corresponds to USE. */
if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
return false;
if (!gimple_assign_copy_p (stmt))
return false;
if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
return false;
operand = gimple_assign_rhs1 (stmt);
if (TREE_CODE (operand) != SSA_NAME)
return false;
......
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