[llvm-dev] Is it possible to mark llvm.masked.store as volatile or to achieve similar functionality?
Mike Vine (EMUL8R) via llvm-dev
llvm-dev at lists.llvm.org
Tue Jun 4 07:41:01 PDT 2019
I'm using llvm.masked.store in our compiler. However, as this is an intrinsic function, I cannot mark it as volatile like I could with an ordinary store.
I don't really care if the masked store is broken down into multiple stores or the ordering of those, I just effectively want those stores to be volatile w.r.t other volatile stores (and loads) before and after.
Is there any easy way to either mark them as volatile, or add fences around the intrinsic call which force similar functionality?
I was thinking of something like adding fences with syncscope of "singlethreaded" to achieve the same things as volatile but I can't work out whether that would work.
Code in question which doesn't let me include a volatile parameter:
bldr.CreateMaskedStore(value, addrVal, align, mask);
More information about the llvm-dev