http://llvm.org/bugs/show_bug.cgi?id=2470
Summary: singlely-initialized value not optimized
Product: libraries
Version: trunk
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Scalar Optimizations
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [email protected]
This is a refinement of PR2436:
extern char *getPtr();
char f(int i, int j) {
char *arr[10];
arr[i] = getPtr();
arr[i][42] = 123;
return arr[j][42];
}
The values of 'j' and 'i' don't actually matter; if they're not equal, the
result is undefined, if they are equal, the function returns 123. The store of
123 can't be eliminated though, just the load of arr[j].
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs