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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs