[PATCH] Added llvm.is.constant intrinsic

Nick Lewycky nicholas at mxc.ca
Fri Jun 27 00:18:25 PDT 2014


Rafael Avila de Espindola wrote:
>
> Ccing nick since it seems related to the enable_if attribute.

Surely not? attribute enable_if is defined entirely in language terms.

I don't see it in LangRef but I thought we already had @llvm.is.constant 
to implement __builtin_constant_p in the middle-end? If I'm remembering 
right then what we should do is try to match gcc's behaviour.

Nick

>> On Jun 25, 2014, at 11:22, Janusz Sobczak<janusz.sobczak at mobica.com>  wrote:
>>
>> ================
>> Comment at: test/CodeGen/Generic/inline-is-constant.ll:4
>> @@ +3,3 @@
>> +; Expected outcome: @fun is inlined and @llvm.is.constant is resolved to TRUE
>> +; Without inlining @llvm.is.constant would resolve to FALSE.
>> +
>> ----------------
>> Renato Golin wrote:
>>> a more robust way would be to have two run lines, one with O0, another with O3, and use FileCheck for the True/False results.
>> If using lli is frowned upon, then the resolution is to call 'llc -debug' and search for the debug strings with FileCheck
>>
>> http://reviews.llvm.org/D4276
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list