<div dir="ltr">On 30 June 2014 13:13, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de" target="_blank">joerg@britannica.bec.de</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On Mon, Jun 30, 2014 at 10:45:24AM +0200, Sobczak, Janusz wrote:<br>
> I'm thinking about modyfing __builtin_constant_p() implementation in clang<br>
> to do this (for integer arguments):<br>
> if (argument is known to be constant)<br>
>     replace  __builtin_constant_p() with 1 (True)<br>
> else<br>
>    replace __builtin_constant_p() with @llvm.is_constant() IR<br>
<br>
</div>What is the intended use case here? All cases that *I* consider to be<br>
sane applications of __builtin_constant_p are workaround for target<br>
specific features that are better exposed as intrinsics themselve, e.g.<br>
IO asm instructions on x86. It is one of the most abused features of<br>
GCC, especially since it can introduce magic variance due to optimizer<br>
changes.<br></blockquote><div> </div><div>Please read the discussion here: <a href="http://llvm.org/bugs/show_bug.cgi?id=4898" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=4898</a><br></div><div><br clear="all"></div>
</div><br>-- <br><div dir="ltr">Janusz Sobczak<br>
Mobica Ltd<br><a href="http://www.mobica.com" target="_blank">www.mobica.com</a> <<a href="http://www.mobica.com" target="_blank">http://www.mobica.com</a>><br><br><br>*Mobica is a provider of software engineering, testing and consultancy <br>

services based in the UK, Poland and the USA, with a worldwide customer <br>base. We have a proven track record in delivering innovative solutions to <br>some of the world’s best-known companies in a range of sectors including <br>

Automotive, Mobile, Semiconductor, Finance, TV, Marine and Aviation.*<br><br></div>
</div></div>