[LLVMbugs] [Bug 1313] NEW: malloc not eliminated, even though result is only used in a null check
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Apr 6 11:43:34 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1313
Summary: malloc not eliminated, even though result is only used
in a null check
Product: new-bugs
Version: unspecified
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
>From the reduced example:
%tmp15.i.i.i23 = malloc [2564 x i32]
icmp eq [2564 x i32]* %tmp15.i.i.i23, null
%retval = zext i1 %0 to i32
ret i32 %retval
Believe it or not, this came up in a real program!
I see no reason why the optimizers should not assume
that the malloc was successful, eliminate the call
and have the function return 0.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list