You can expand nodes into a serious of instructions, even with control
flow. Take a look at how the PowerPC target lower atomic operations.
Look for usesCustomDAGSchedInserter in PPCInstrInfo.td,
PPCTargetLowering::EmitAtomicBinary.
Evan
On Nov 12, 2008, at 9:14 PM, Sachin.Punyani at microchip.com wrote:
> Hi,
>
> My target supports shift with amount 1 only i.e. to shift a value by
> 5 bits, I need to have a loop with shift in the body. Similarly for
> the unknown amount of shift we need to have a loop for shift.
>
> 1) How can I insert this loop in DAG for shift operation?
> 2) Is there a way where I can have a call to a function and
> later expand to the shift code?
>
> Which would be the better way to implement this?
>
> Regards
> Sachin
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20081113/58b01d21/attachment.html>