I can't think of any NVPTX intrinsic that disallow even arithmetic instructions. <br><div><br></div><div>If you are trying to read some special registers in PTX, can you use inline assembly and mark it as having side effects? I think LLVM's optimizer is very conservative about inline assembly marked with sideeffect, and will probably solve your code motion issue. </div><div><br></div><div>Jingyue</div><br><div class="gmail_quote">On Tue Sep 30 2014 at 11:03:45 AM RAVI KORSA <<a href="mailto:ravi.korsa@gmail.com">ravi.korsa@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The actual purpose that I wanted such an intrinsic is to solve a problem similar to this one in X86. Say I wanted to read the "mxcsr" register(which is the status register for SSE instructions) after a particular instruction, then I need a kind of barrier intrinsic which will not allow the arithmetic instructions to move around it. Or else I will be reading the status of some other instruction.<br><br></div>Thanks <br></div>
</blockquote></div>