URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -fdump-tree-dce2" } */
|
/* { dg-options "-O -fdump-tree-dce2" } */
|
|
|
/* Verify that we can eliminate the useless conversions to/from
|
/* Verify that we can eliminate the useless conversions to/from
|
const qualified pointer types
|
const qualified pointer types
|
this_2 = o_1;
|
this_2 = o_1;
|
D.20003_4 = this_2->data_m;
|
D.20003_4 = this_2->data_m;
|
this_5 = D.20003_4;
|
this_5 = D.20003_4;
|
D.20005_6 = this_5->value;
|
D.20005_6 = this_5->value;
|
copyprop should propagate o_1 and D.20003_4 to the loads of data_m
|
copyprop should propagate o_1 and D.20003_4 to the loads of data_m
|
and value. dce removes all traces of this. */
|
and value. dce removes all traces of this. */
|
|
|
struct Data {
|
struct Data {
|
int get() const { return value; }
|
int get() const { return value; }
|
int value;
|
int value;
|
};
|
};
|
|
|
struct Object {
|
struct Object {
|
int operator[](int i) const { return data_m->get(); }
|
int operator[](int i) const { return data_m->get(); }
|
Data *data_m;
|
Data *data_m;
|
};
|
};
|
|
|
int foo(Object&o)
|
int foo(Object&o)
|
{
|
{
|
return o[0];
|
return o[0];
|
}
|
}
|
|
|
/* { dg-final { scan-tree-dump-not ".* = \[^>;\]*;" "dce2" { xfail *-*-* } } } */
|
/* { dg-final { scan-tree-dump-not ".* = \[^>;\]*;" "dce2" { xfail *-*-* } } } */
|
/* { dg-final { cleanup-tree-dump "dce2" } } */
|
/* { dg-final { cleanup-tree-dump "dce2" } } */
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.