There is an obvious redundant LOAD in the in the following code ( (*) line):
void f (int n, int *cond, int *res)
{
int i;
*res = 0;
for (i = 0; i < n; i++)
if (*cond)
*res ^= 234; /* (*) */
}
GCSE LAS (load after store) catches it in RTL stage but it should be catched by
PRE in TreeSSA stage.
--
Summary: TreeSSA-PRE load after store misoptimization
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergeid at il dot ibm dot com
GCC build triplet: powerpc
GCC host triplet: powerpc
GCC target triplet: powerpc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38401