[llvm-bugs] [Bug 27309] New: Volatile stores of undef values are deleted

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Apr 10 03:37:01 PDT 2016


            Bug ID: 27309
           Summary: Volatile stores of undef values are deleted
           Product: libraries
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: koriakin at 0x04.net
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

All stores of undef values are deleted at the moment - including volatile

define void @f(i32 *%p) {
  store volatile i32 undef, i32 *%p;
  ret void;

Compiles to:

f: retq

In theory, the pointer could point to a hardware device where the store has
some side-effects like increasing a queue pointer.  A driver that wants to
write dummy data could reasonably store an undef and need it to be actually

Bug found when browsing idly through the code, I don't actually have a
real-world case for it.

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/20160410/de4029f9/attachment.html>

More information about the llvm-bugs mailing list