Skip to content

Volatile stores of undef values are deleted #27683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
llvmbot opened this issue Apr 10, 2016 · 1 comment
Closed

Volatile stores of undef values are deleted #27683

llvmbot opened this issue Apr 10, 2016 · 1 comment
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:SelectionDAG SelectionDAGISel as well

Comments

@llvmbot
Copy link
Member

llvmbot commented Apr 10, 2016

Bugzilla Link 27309
Version trunk
OS All
Reporter LLVM Bugzilla Contributor
CC @sanjoy

Extended Description

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

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 performed.

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

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@enferex enferex self-assigned this Aug 7, 2024
@enferex enferex closed this as completed Aug 7, 2024
@enferex
Copy link
Contributor

enferex commented Aug 7, 2024

Closed as fixed by 404071b

@EugeneZelenko EugeneZelenko added the llvm:SelectionDAG SelectionDAGISel as well label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

No branches or pull requests

3 participants