[LLVMdev] Behaviour of NVPTX intrinsic

Kuperstein, Michael M michael.m.kuperstein at intel.com
Wed Oct 1 23:59:41 PDT 2014


This issue comes up every once in a while, see for example:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-January/069767.html
Or, for something much older:
http://llvm.org/bugs/show_bug.cgi?id=6393

The bottom line is that, unfortunately, there is no good way to enforce that at the IR level.

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of RAVI KORSA
Sent: Wednesday, October 01, 2014 10:50
To: Jonathan Roelofs
Cc: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Behaviour of NVPTX intrinsic

I understand that.  Once the control reaches the target back-end, I can disallow instructions moving around an intrinsic by defining an SDNode for the intrinsic, setting it's properties appropriately and custom lowering it etc. But my question was aimed at how do we stop the "opt" passes from moving the arithmetic instructions around the intrinsic. For example we have "llvm.arm.set.fpscr" intrinsic to set the rounding mode of the arithmetic instructions following it. But if "opt" passes move arithmetic instructions around it, then the expected results are wrong. Am trying to check if anyone has a solution for this already.
Thanks.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141002/e50cbdd8/attachment.html>


More information about the llvm-dev mailing list