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:
parent
a4bf37944a
commit
59a05b0ca2
@ -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>
|
||||
|
||||
* tree-eh.c (lower_try_finally_copy): Do lower_eh_constructs_1
|
||||
|
@ -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>
|
||||
|
||||
PR fortran/41706
|
||||
|
16
gcc/testsuite/gnat.dg/loop_optimization7.adb
Normal file
16
gcc/testsuite/gnat.dg/loop_optimization7.adb
Normal 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;
|
9
gcc/testsuite/gnat.dg/loop_optimization7.ads
Normal file
9
gcc/testsuite/gnat.dg/loop_optimization7.ads
Normal 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;
|
10
gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads
Normal file
10
gcc/testsuite/gnat.dg/loop_optimization7_pkg.ads
Normal 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;
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user