mirror of git://gcc.gnu.org/git/gcc.git
re PR tree-optimization/56837 (-ftree-loop-distribute-patterns generates incorrect code)
2013-04-04 Richard Biener <rguenther@suse.de> PR tree-optimization/56837 * tree-loop-distribution.c (classify_partition): For non-zero values require that the value has the same precision as its mode to be useful as memset value. * g++.dg/torture/pr56837.C: New testcase. From-SVN: r197476
This commit is contained in:
parent
2d50082803
commit
f1bf4f3afb
|
|
@ -1,3 +1,10 @@
|
||||||
|
2013-04-04 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/56837
|
||||||
|
* tree-loop-distribution.c (classify_partition): For non-zero
|
||||||
|
values require that the value has the same precision as its
|
||||||
|
mode to be useful as memset value.
|
||||||
|
|
||||||
2013-04-03 Nick Clifton <nickc@redhat.com>
|
2013-04-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* config/v850/v850e3v5.md (fmasf4): Use fmaf.s on E3V5
|
* config/v850/v850e3v5.md (fmasf4): Use fmaf.s on E3V5
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-04-04 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/56837
|
||||||
|
* g++.dg/torture/pr56837.C: New testcase.
|
||||||
|
|
||||||
2013-04-04 Tobias Burnus <burnus@net-b.de>
|
2013-04-04 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/50269
|
PR fortran/50269
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
// { dg-do run }
|
||||||
|
// { dg-options "-ftree-loop-distribute-patterns" }
|
||||||
|
|
||||||
|
extern "C" void abort (void);
|
||||||
|
extern "C" int memcmp (const void *, const void *, __SIZE_TYPE__);
|
||||||
|
|
||||||
|
bool b1[8];
|
||||||
|
bool b2[8] = { true, true, true, true, true, true, true, true };
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
for(i=0 ; i < 8; i++)
|
||||||
|
b1[i] = true;
|
||||||
|
|
||||||
|
if (memcmp (b1, b2, 8) != 0)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
@ -942,13 +942,17 @@ classify_partition (loop_p loop, struct graph *rdg, partition_t partition)
|
||||||
gimple stmt = DR_STMT (single_store);
|
gimple stmt = DR_STMT (single_store);
|
||||||
tree rhs = gimple_assign_rhs1 (stmt);
|
tree rhs = gimple_assign_rhs1 (stmt);
|
||||||
if (!(integer_zerop (rhs)
|
if (!(integer_zerop (rhs)
|
||||||
|| integer_all_onesp (rhs)
|
|
||||||
|| real_zerop (rhs)
|
|| real_zerop (rhs)
|
||||||
|| (TREE_CODE (rhs) == CONSTRUCTOR
|
|| (TREE_CODE (rhs) == CONSTRUCTOR
|
||||||
&& !TREE_CLOBBER_P (rhs))
|
&& !TREE_CLOBBER_P (rhs))
|
||||||
|| (INTEGRAL_TYPE_P (TREE_TYPE (rhs))
|
|| ((integer_all_onesp (rhs)
|
||||||
&& (TYPE_MODE (TREE_TYPE (gimple_assign_lhs (stmt)))
|
|| (INTEGRAL_TYPE_P (TREE_TYPE (rhs))
|
||||||
== TYPE_MODE (unsigned_char_type_node)))))
|
&& (TYPE_MODE (TREE_TYPE (rhs))
|
||||||
|
== TYPE_MODE (unsigned_char_type_node))))
|
||||||
|
/* For stores of a non-zero value require that the precision
|
||||||
|
of the value matches its actual size. */
|
||||||
|
&& (TYPE_PRECISION (TREE_TYPE (rhs))
|
||||||
|
== GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (rhs)))))))
|
||||||
return;
|
return;
|
||||||
if (TREE_CODE (rhs) == SSA_NAME
|
if (TREE_CODE (rhs) == SSA_NAME
|
||||||
&& !SSA_NAME_IS_DEFAULT_DEF (rhs)
|
&& !SSA_NAME_IS_DEFAULT_DEF (rhs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue