[llvm] [FunctionAttrs] Switch readonly etc inference to use CaptureTracking (PR #201136)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 08:17:38 PDT 2026
================
@@ -480,7 +480,7 @@ define void @memcpy(ptr %p, ptr %p2) {
define void @memcpy_volatile(ptr %p, ptr %p2) {
; CHECK: Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite, inaccessiblemem: readwrite)
; CHECK-LABEL: define void @memcpy_volatile(
-; CHECK-SAME: ptr writeonly [[P:%.*]], ptr readonly [[P2:%.*]]) #[[ATTR2]] {
----------------
nikic wrote:
It depends on what exactly volatile accesses are allowed to do. We specify that they can read and write inaccessible memory, but are not super clear on what they are allowed to do to the accessed location. For example, if you do two consecutive volatile loads of the same location, are they required to return the same value or not?
https://github.com/llvm/llvm-project/pull/201136
More information about the llvm-commits
mailing list