mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-18 14:31:48 +08:00
fold-const.c (fold_ternary_loc): Constant-propagate after removing dead operands.
2012-09-03 Marc Glisse <marc.glisse@inria.fr> gcc/ * fold-const.c (fold_ternary_loc): Constant-propagate after removing dead operands. gcc/testsuite/ * gcc.dg/fold-perm.c: Improve test. From-SVN: r190901
This commit is contained in:
parent
197ce79334
commit
aa369472a2
@ -1,3 +1,8 @@
|
||||
2012-09-03 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* fold-const.c (fold_ternary_loc): Constant-propagate after
|
||||
removing dead operands.
|
||||
|
||||
2012-09-03 Michael Matz <matz@suse.de>
|
||||
|
||||
PR tree-optimization/46590
|
||||
|
@ -14196,16 +14196,6 @@ fold_ternary_loc (location_t loc, enum tree_code code, tree type,
|
||||
return op1;
|
||||
}
|
||||
|
||||
if ((TREE_CODE (arg0) == VECTOR_CST
|
||||
|| TREE_CODE (arg0) == CONSTRUCTOR)
|
||||
&& (TREE_CODE (arg1) == VECTOR_CST
|
||||
|| TREE_CODE (arg1) == CONSTRUCTOR))
|
||||
{
|
||||
t = fold_vec_perm (type, arg0, arg1, sel);
|
||||
if (t != NULL_TREE)
|
||||
return t;
|
||||
}
|
||||
|
||||
if (all_in_vec0)
|
||||
op1 = op0;
|
||||
else if (all_in_vec1)
|
||||
@ -14216,6 +14206,16 @@ fold_ternary_loc (location_t loc, enum tree_code code, tree type,
|
||||
need_mask_canon = true;
|
||||
}
|
||||
|
||||
if ((TREE_CODE (op0) == VECTOR_CST
|
||||
|| TREE_CODE (op0) == CONSTRUCTOR)
|
||||
&& (TREE_CODE (op1) == VECTOR_CST
|
||||
|| TREE_CODE (op1) == CONSTRUCTOR))
|
||||
{
|
||||
t = fold_vec_perm (type, op0, op1, sel);
|
||||
if (t != NULL_TREE)
|
||||
return t;
|
||||
}
|
||||
|
||||
if (op0 == op1 && !single_arg)
|
||||
changed = true;
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2012-09-03 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
* gcc.dg/fold-perm.c: Improve test.
|
||||
|
||||
2012-09-03 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/51632
|
||||
|
@ -3,11 +3,12 @@
|
||||
|
||||
typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
|
||||
|
||||
void fun (veci *f, veci *g, veci *h)
|
||||
void fun (veci *f, veci *g, veci *h, veci *i)
|
||||
{
|
||||
veci m = { 7, 7, 4, 6 };
|
||||
veci n = { 0, 1, 2, 3 };
|
||||
veci p = { 1, 1, 7, 6 };
|
||||
*i = __builtin_shuffle (*i, p, m);
|
||||
*h = __builtin_shuffle (*h, *h, p);
|
||||
*g = __builtin_shuffle (*f, *g, m);
|
||||
*f = __builtin_shuffle (*f, *g, n);
|
||||
|
Loading…
x
Reference in New Issue
Block a user