[LLVMbugs] [Bug 16386] New: store forwarding across operator new() call

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 20 03:25:39 PDT 2013


            Bug ID: 16386
           Summary: store forwarding across operator new() call
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: eugeni.stepanov at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

int x;
volatile int z;
int *f() {
  x = 1;
  int *p = new int;
  z = x;
  return p;

clang -O2:

  store i32 1, i32* @x, align 4, !tbaa !0
  %call = tail call noalias i8* @_Znwm(i64 4)
  %0 = bitcast i8* %call to i32*
  store volatile i32 1, i32* @z, align 4, !tbaa !0

This does not allow overloading operator new() to access 'x'.

-fno-sane-operator-new disables this optimization.

AFAIU, it should be always disabled.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130620/e016650c/attachment.html>

More information about the llvm-bugs mailing list