[LLVMbugs] [Bug 17405] DSE miscompile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 1 11:41:06 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=17405

Hal Finkel <hfinkel at anl.gov> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Hal Finkel <hfinkel at anl.gov> ---
I'm closing this bug; the problem seems to be that the input IR is subtly
invalid. The call instruction:

%call5.1 = tail call signext i8 @toggle_value(%struct.Toggle* %1) #4

is marked as a tail call, and according to BasicAA cannot modify its
stack-allocated argument (although it actually does):

lib/Analysis/BasicAliasAnalysis.cpp:
  // If this is a tail call and Loc.Ptr points to a stack location, we know
that
  // the tail call cannot access or modify the local stack.
  // We cannot exclude byval arguments here; these belong to the caller of
  // the current function not to the current function, and a tail callee
  // may reference them.
  if (isa<AllocaInst>(Object))
    if (const CallInst *CI = dyn_cast<CallInst>(CS.getInstruction()))
      if (CI->isTailCall())
        return NoModRef;

-- 
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/20131001/c1ff9332/attachment.html>


More information about the llvm-bugs mailing list