* tree-ssa-loop-im.c (rewrite_reciprocal): Use build_one_cst.
From-SVN: r166103
This commit is contained in:
parent
b9acc9f1de
commit
8e8e423f69
|
@ -1,3 +1,7 @@
|
||||||
|
2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
|
||||||
|
|
||||||
|
* tree-ssa-loop-im.c (rewrite_reciprocal): Use build_one_cst.
|
||||||
|
|
||||||
2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
|
2010-10-30 Nathan Froyd <froydnj@codesourcery.com>
|
||||||
|
|
||||||
* fold-const.c (build_zero_vector): Use build_vector_from_val.
|
* fold-const.c (build_zero_vector): Use build_vector_from_val.
|
||||||
|
|
|
@ -910,19 +910,7 @@ rewrite_reciprocal (gimple_stmt_iterator *bsi)
|
||||||
add_referenced_var (var);
|
add_referenced_var (var);
|
||||||
DECL_GIMPLE_REG_P (var) = 1;
|
DECL_GIMPLE_REG_P (var) = 1;
|
||||||
|
|
||||||
/* For vectors, create a VECTOR_CST full of 1's. */
|
real_one = build_one_cst (type);
|
||||||
if (TREE_CODE (type) == VECTOR_TYPE)
|
|
||||||
{
|
|
||||||
int i, len;
|
|
||||||
tree list = NULL_TREE;
|
|
||||||
real_one = build_real (TREE_TYPE (type), dconst1);
|
|
||||||
len = TYPE_VECTOR_SUBPARTS (type);
|
|
||||||
for (i = 0; i < len; i++)
|
|
||||||
list = tree_cons (NULL, real_one, list);
|
|
||||||
real_one = build_vector (type, list);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
real_one = build_real (type, dconst1);
|
|
||||||
|
|
||||||
stmt1 = gimple_build_assign_with_ops (RDIV_EXPR,
|
stmt1 = gimple_build_assign_with_ops (RDIV_EXPR,
|
||||||
var, real_one, gimple_assign_rhs2 (stmt));
|
var, real_one, gimple_assign_rhs2 (stmt));
|
||||||
|
|
Loading…
Reference in New Issue