<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 27, 2017 at 10:19 AM, Sanjoy Das via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">sanjoy added a comment.<br>
<span class=""><br>
In <a href="https://reviews.llvm.org/D29925#687131" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D29925#687131</a>, @dberlin wrote:<br>
<br>
</span><span class="">> I wasn't aware intrinsics were allowed to have a calling convention, since they are internal to llvm.<br>
>  No intrinsic defined  in Intrinsics* has one, from what i can tell, and as you can see, the code we use to upgrade generically does not do anything with calling convention either.<br>
>  I'm not even sure what it would mean for an intrinsic to have a calling convention (instead of something it *lowers to* to have a calling convention).<br>
<br>
<br>
</span>It is used for statepoints and patchpoints.  `call cconv42 @statepoint(@foo)` is lowered to a call to `@foo`, and `cconv42` is interpreted as the calling convention for the lowered call to `@foo`.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div><br></div><div>Interesting.</div><div>Okay, so then should we handle calling convention and attributes or just calling convention?</div><div><br></div></div></div></div>