[LLVMbugs] [Bug 11240] New: redundant new/delete pair not removed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 26 13:58:26 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=11240
Summary: redundant new/delete pair not removed
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7535)
--> (http://llvm.org/bugs/attachment.cgi?id=7535)
Reduced testcase
The attached IR has a redundant new/delete pair (for %alloc1, whose only other
use is a dead store). The code has been manually reduced from this (compiled
with a large inlining threshold):
#include <vector>
void resize() {
std::vector<int> v;
v.push_back(1);
v.push_back(2);
// ...
}
The optimizer is unable to remove this new/delete pair. The outcome seems to be
quite sensitive to the other instructions in the IR: the optimization did fire
in various partially-reduced testcases containing this IR plus some other
seemingly-irrelevant instructions.
--
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.
More information about the llvm-bugs
mailing list