mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 08:00:28 +08:00
tree-ssa-sccvn.c (vn_reference_op_eq): Use types_compatible_p instead of pointer equality.
2008-10-04 Richard Guenther <rguenther@suse.de> * tree-ssa-sccvn.c (vn_reference_op_eq): Use types_compatible_p instead of pointer equality. (vn_nary_op_eq): Likewise. * gcc.dg/tree-ssa/ssa-pre-21.c: New testcase. From-SVN: r140868
This commit is contained in:
parent
f913dcd658
commit
63a14fa3cd
@ -1,3 +1,9 @@
|
||||
2008-10-04 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* tree-ssa-sccvn.c (vn_reference_op_eq): Use types_compatible_p
|
||||
instead of pointer equality.
|
||||
(vn_nary_op_eq): Likewise.
|
||||
|
||||
2008-10-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
|
||||
|
||||
* config/rs6000/rs6000.md (fseldfsf4): Add TARGET_SINGLE_FLOAT
|
||||
|
@ -1,3 +1,7 @@
|
||||
2008-10-04 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
* gcc.dg/tree-ssa/ssa-pre-21.c: New testcase.
|
||||
|
||||
2008-10-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/37726
|
||||
|
15
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c
Normal file
15
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-pre" } */
|
||||
|
||||
long
|
||||
NumSift (long *array, unsigned long k)
|
||||
{
|
||||
if (array[k] < array[k + 1L])
|
||||
++k;
|
||||
return array[k];
|
||||
}
|
||||
|
||||
/* There should be only two loads left. */
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "= \\\*D" 2 "pre" } } */
|
||||
/* { dg-final { cleanup-tree-dump "pre" } } */
|
@ -387,7 +387,7 @@ vn_reference_op_eq (const void *p1, const void *p2)
|
||||
const_vn_reference_op_t const vro1 = (const_vn_reference_op_t) p1;
|
||||
const_vn_reference_op_t const vro2 = (const_vn_reference_op_t) p2;
|
||||
return vro1->opcode == vro2->opcode
|
||||
&& vro1->type == vro2->type
|
||||
&& types_compatible_p (vro1->type, vro2->type)
|
||||
&& expressions_equal_p (vro1->op0, vro2->op0)
|
||||
&& expressions_equal_p (vro1->op1, vro2->op1)
|
||||
&& expressions_equal_p (vro1->op2, vro2->op2);
|
||||
@ -1184,7 +1184,7 @@ vn_nary_op_eq (const void *p1, const void *p2)
|
||||
unsigned i;
|
||||
|
||||
if (vno1->opcode != vno2->opcode
|
||||
|| vno1->type != vno2->type)
|
||||
|| !types_compatible_p (vno1->type, vno2->type))
|
||||
return false;
|
||||
|
||||
for (i = 0; i < vno1->length; ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user