[LLVMdev] Is it possible to define a LLVM intrinsic that expands in more than one instructions ?

Justin Holewinski justin.holewinski at gmail.com
Wed Feb 20 05:46:42 PST 2013


Sure, a back-end is free to expand an intrinsic into as many instructions
as it wishes.  You can define this in TableGen with a pattern:

def : Pat<(my_intrinsic Reg:$a, Reg:$b), (MyInst1 (MyInst2 Reg:$a),
Reg:$b)>;

This would expand a call to @llvm.my_intrinsic(a, b) to:

r1 = MyInst2 $a
r2 = MyInst1 r1, $b



On Wed, Feb 20, 2013 at 8:09 AM, Sebastien DELDON-GNB <
sebastien.deldon at st.com> wrote:

> Hi all,****
>
> ** **
>
> Is it possible to define a LLVM intrinsic that expands in more than one
> instructions ?****
>
> If yes, how ?****
>
> ** **
>
> Best Regards****
>
> Seb****
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>


-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130220/087863fa/attachment.html>


More information about the llvm-dev mailing list