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
This commit is contained in:
Eric Botcazou 2009-10-21 10:08:39 +00:00 committed by Eric Botcazou
parent a4bf37944a
commit 59a05b0ca2
6 changed files with 49 additions and 6 deletions

View File

@ -1,3 +1,8 @@
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> 2009-10-20 Richard Henderson <rth@redhat.com>
* tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1 * tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1

View File

@ -1,3 +1,8 @@
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> 2009-10-21 Janus Weil <janus@gcc.gnu.org>
PR fortran/41706 PR fortran/41706

View File

@ -0,0 +1,16 @@
-- { 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;

View File

@ -0,0 +1,9 @@
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;

View File

@ -0,0 +1,10 @@
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;

View File

@ -192,13 +192,11 @@ exist_non_indexing_operands_for_use_p (tree use, gimple stmt)
Therefore, all we need to check is if STMT falls into the Therefore, all we need to check is if STMT falls into the
first case, and whether var corresponds to USE. */ 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)) if (!gimple_assign_copy_p (stmt))
return false; return false;
if (TREE_CODE (gimple_assign_lhs (stmt)) == SSA_NAME)
return false;
operand = gimple_assign_rhs1 (stmt); operand = gimple_assign_rhs1 (stmt);
if (TREE_CODE (operand) != SSA_NAME) if (TREE_CODE (operand) != SSA_NAME)
return false; return false;