[LLVMdev] Intrinsic parameters verification
Matt Arsenault
Matthew.Arsenault at amd.com
Wed Jul 1 12:05:44 PDT 2015
On 07/01/2015 11:57 AM, Quentin Colombet wrote:
> Hi Elena,
>
> I think the checks are done by the front-end, then if the values
> provided to an intrinsic do not work for the IR, the backend aborts
> with cannot select.
> I may be wrong of course, this is my recollection of how the ARM
> backend work for neon intrinsics.
>
> The bottom line is you may want to ask this question to cfe dev.
>
> Cheers,
> Q.
This is correct. clang allows defining a builtin, which will eventually
map to an intrinsic call and allows you to enforce that the parameter
folds to a constant integer. However, AFAIK there isn't an easy way to
restrict the values there.
-Matt
More information about the llvm-dev
mailing list