[llvm] [FunctionAttrs][IR] Fix memory attr inference for volatile mem intrinsics (PR #122926)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Mar 21 03:50:07 PDT 2025
    
    
  
nikic wrote:
I've been thinking about this again, and I think a clean way to handle this may be via operand bundle.
```llvm
; Non-volatile memset
call void @llvm.memset(ptr %p, i8 0, i64 %len)
; Volatile memset
call void @llvm.memset(ptr %p, i8 0, i64 %len) ["volatile"()]
```
Operand bundles are allowed to add additional memory effects, so this would be consistent with our overall IR model.
https://github.com/llvm/llvm-project/pull/122926
    
    
More information about the llvm-commits
mailing list